MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_config_cache

Method test_config_cache

testing/test_cacheprovider.py:96–112  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

94 )
95
96 def test_config_cache(self, pytester: Pytester) -> None:
97 pytester.makeconftest(
98 """
99 def pytest_configure(config):
100 # see that we get cache information early on
101 assert hasattr(config, "cache")
102 """
103 )
104 pytester.makepyfile(
105 """
106 def test_session(pytestconfig):
107 assert hasattr(pytestconfig, "cache")
108 """
109 )
110 result = pytester.runpytest()
111 assert result.ret == 0
112 result.stdout.fnmatch_lines(["*1 passed*"])
113
114 def test_cachefuncarg(self, pytester: Pytester) -> None:
115 pytester.makepyfile(

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected