(self, request, tmp_path_factory: TempPathFactory)
| 44 | class TestConftestValueAccessGlobal: |
| 45 | @pytest.fixture(scope="module", params=["global", "inpackage"]) |
| 46 | def basedir(self, request, tmp_path_factory: TempPathFactory) -> Generator[Path]: |
| 47 | tmp_path = tmp_path_factory.mktemp("basedir", numbered=True) |
| 48 | tmp_path.joinpath("adir/b").mkdir(parents=True) |
| 49 | tmp_path.joinpath("adir/conftest.py").write_text( |
| 50 | "a=1 ; Directory = 3", encoding="utf-8" |
| 51 | ) |
| 52 | tmp_path.joinpath("adir/b/conftest.py").write_text( |
| 53 | "b=2 ; a = 1.5", encoding="utf-8" |
| 54 | ) |
| 55 | if request.param == "inpackage": |
| 56 | tmp_path.joinpath("adir/__init__.py").touch() |
| 57 | tmp_path.joinpath("adir/b/__init__.py").touch() |
| 58 | |
| 59 | yield tmp_path |
| 60 | |
| 61 | def test_basic_init(self, basedir: Path) -> None: |
| 62 | conftest = PytestPluginManager() |
nothing calls this directly
no test coverage detected