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

Method test_custom_rel_cache_dir

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

Source from the content-addressed store, hash-verified

129 result.stdout.fnmatch_lines(["*1 passed*"])
130
131 def test_custom_rel_cache_dir(self, pytester: Pytester) -> None:
132 rel_cache_dir = os.path.join("custom_cache_dir", "subdir")
133 pytester.makeini(
134 """
135 [pytest]
136 cache_dir = {cache_dir}
137 """.format(
138 cache_dir=rel_cache_dir
139 )
140 )
141 pytester.makepyfile(test_errored="def test_error():\n assert False")
142 pytester.runpytest()
143 assert pytester.path.joinpath(rel_cache_dir).is_dir()
144
145 def test_custom_abs_cache_dir(
146 self, pytester: Pytester, tmp_path_factory: TempPathFactory

Callers

nothing calls this directly

Calls 4

makeiniMethod · 0.45
formatMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected