forked from pytest-dev/pytest
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dynamic setup of
pytest.collect
fake module
Make it a real module instead. This was initially added in 9b58d6e (pytest-dev#2315), when removing support for `pytest_namespace`. Not sure if it ever worked "properly", but currently `import pytest.collect` and `from pytest.collect import File` do not work (but with this patch). This is only relevant for (backward) compatibility, but the more it appears to make sense to move it into a lazily loaded, separate file.
- Loading branch information
Showing
3 changed files
with
10 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Fake module for backward compatibility.""" | ||
from . import _fillfuncargs # noqa: F401 | ||
from . import Class # noqa: F401 | ||
from . import Collector # noqa: F401 | ||
from . import File # noqa: F401 | ||
from . import Function # noqa: F401 | ||
from . import Instance # noqa: F401 | ||
from . import Item # noqa: F401 | ||
from . import Module # noqa: F401 | ||
from . import Session # noqa: F401 |