MCPcopy
hub / github.com/pytest-dev/pytest / test_cache_reportheader_external_abspath

Function test_cache_reportheader_external_abspath

testing/test_cacheprovider.py:214–229  ·  view source on GitHub ↗
(
    pytester: Pytester, tmp_path_factory: TempPathFactory
)

Source from the content-addressed store, hash-verified

212
213
214def test_cache_reportheader_external_abspath(
215 pytester: Pytester, tmp_path_factory: TempPathFactory
216) -> None:
217 external_cache = tmp_path_factory.mktemp(
218 "test_cache_reportheader_external_abspath_abs"
219 )
220
221 pytester.makepyfile("def test_hello(): pass")
222 pytester.makeini(
223 f"""
224 [pytest]
225 cache_dir = {external_cache}
226 """
227 )
228 result = pytester.runpytest("-v")
229 result.stdout.fnmatch_lines([f"cachedir: {external_cache}"])
230
231
232def test_cache_show(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 5

fnmatch_linesMethod · 0.80
mktempMethod · 0.45
makepyfileMethod · 0.45
makeiniMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected