diff --git a/src/_pytest/legacypath.py b/src/_pytest/legacypath.py index 743c06d55c..8307f56e89 100644 --- a/src/_pytest/legacypath.py +++ b/src/_pytest/legacypath.py @@ -245,9 +245,6 @@ def __str__(self) -> str: return str(self.tmpdir) -pytest.Testdir = Testdir # type: ignore[attr-defined] - - class LegacyTestdirPlugin: @staticmethod @pytest.fixture @@ -284,9 +281,6 @@ def getbasetemp(self) -> LEGACY_PATH: return legacy_path(self._tmppath_factory.getbasetemp().resolve()) -pytest.TempdirFactory = TempdirFactory # type: ignore[attr-defined] - - class LegacyTmpdirPlugin: @staticmethod @pytest.fixture(scope="session") diff --git a/src/pytest/__init__.py b/src/pytest/__init__.py index 9c284ac961..777d377406 100644 --- a/src/pytest/__init__.py +++ b/src/pytest/__init__.py @@ -23,6 +23,8 @@ from _pytest.fixtures import FixtureRequest from _pytest.fixtures import yield_fixture from _pytest.freeze_support import freeze_includes +from _pytest.legacypath import TempdirFactory +from _pytest.legacypath import Testdir from _pytest.logging import LogCaptureFixture from _pytest.main import Session from _pytest.mark import Mark @@ -142,7 +144,9 @@ "Stash", "StashKey", "version_tuple", + "TempdirFactory", "TempPathFactory", + "Testdir", "TestReport", "UsageError", "WarningsRecorder",