(pytester: Pytester, name: str)
| 219 | |
| 220 | @pytest.mark.parametrize("name", "test tests whatever .dotdir".split()) |
| 221 | def test_setinitial_conftest_subdirs(pytester: Pytester, name: str) -> None: |
| 222 | sub = pytester.mkdir(name) |
| 223 | subconftest = sub.joinpath("conftest.py") |
| 224 | subconftest.touch() |
| 225 | conftest = PytestPluginManager() |
| 226 | conftest_setinitial(conftest, [sub.parent], confcutdir=pytester.path) |
| 227 | key = subconftest.resolve() |
| 228 | if name not in ("whatever", ".dotdir"): |
| 229 | assert key in conftest._conftestpath2mod |
| 230 | assert len(conftest._conftestpath2mod) == 1 |
| 231 | else: |
| 232 | assert key not in conftest._conftestpath2mod |
| 233 | assert len(conftest._conftestpath2mod) == 0 |
| 234 | |
| 235 | |
| 236 | def test_conftest_confcutdir(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected