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

Function test_cache_reportheader

testing/test_cacheprovider.py:180–189  ·  view source on GitHub ↗
(env, pytester: Pytester, monkeypatch: MonkeyPatch)

Source from the content-addressed store, hash-verified

178
179@pytest.mark.parametrize("env", ((), ("TOX_ENV_DIR", "/tox_env_dir")))
180def test_cache_reportheader(env, pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
181 pytester.makepyfile("""def test_foo(): pass""")
182 if env:
183 monkeypatch.setenv(*env)
184 expected = os.path.join(env[1], ".pytest_cache")
185 else:
186 monkeypatch.delenv("TOX_ENV_DIR", raising=False)
187 expected = ".pytest_cache"
188 result = pytester.runpytest("-v")
189 result.stdout.fnmatch_lines(["cachedir: %s" % expected])
190
191
192def test_cache_reportheader_external_abspath(

Callers

nothing calls this directly

Calls 5

setenvMethod · 0.80
delenvMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected