| 42 | class TestConftestValueAccessGlobal: |
| 43 | @pytest.fixture(scope="module", params=["global", "inpackage"]) |
| 44 | def basedir( |
| 45 | self, request, tmp_path_factory: TempPathFactory |
| 46 | ) -> Generator[Path, None, None]: |
| 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("a=1 ; Directory = 3") |
| 50 | tmp_path.joinpath("adir/b/conftest.py").write_text("b=2 ; a = 1.5") |
| 51 | if request.param == "inpackage": |
| 52 | tmp_path.joinpath("adir/__init__.py").touch() |
| 53 | tmp_path.joinpath("adir/b/__init__.py").touch() |
| 54 | |
| 55 | yield tmp_path |
| 56 | |
| 57 | def test_basic_init(self, basedir: Path) -> None: |
| 58 | conftest = PytestPluginManager() |