(pytester: Pytester, name: str)
| 250 | |
| 251 | @pytest.mark.parametrize("name", "test tests whatever .dotdir".split()) |
| 252 | def test_setinitial_conftest_subdirs(pytester: Pytester, name: str) -> None: |
| 253 | sub = pytester.mkdir(name) |
| 254 | subconftest = sub.joinpath("conftest.py") |
| 255 | subconftest.touch() |
| 256 | pm = PytestPluginManager() |
| 257 | conftest_setinitial(pm, [sub.parent], confcutdir=pytester.path) |
| 258 | key = subconftest.resolve() |
| 259 | if name not in ("whatever", ".dotdir"): |
| 260 | assert pm.has_plugin(str(key)) |
| 261 | assert len(set(pm.get_plugins()) - {pm}) == 1 |
| 262 | else: |
| 263 | assert not pm.has_plugin(str(key)) |
| 264 | assert len(set(pm.get_plugins()) - {pm}) == 0 |
| 265 | |
| 266 | |
| 267 | def test_conftest_confcutdir(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected