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

Function test_issue151_load_all_conftests

testing/test_conftest.py:142–151  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

140
141
142def test_issue151_load_all_conftests(pytester: Pytester) -> None:
143 names = "code proj src".split()
144 for name in names:
145 p = pytester.mkdir(name)
146 p.joinpath("conftest.py").touch()
147
148 conftest = PytestPluginManager()
149 conftest_setinitial(conftest, names)
150 d = list(conftest._conftestpath2mod.values())
151 assert len(d) == len(names)
152
153
154def test_conftest_global_import(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

PytestPluginManagerClass · 0.90
conftest_setinitialFunction · 0.85
mkdirMethod · 0.45

Tested by

no test coverage detected