summaryrefslogtreecommitdiff
path: root/src/_pytest/compat.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2020-03-29 20:30:16 +0200
committerRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2020-03-30 21:53:07 +0200
commitf1d51ba1f57619e71cdf787ff1507be59a057c73 (patch)
tree134574592a87d64a8c9b4298a963ad75e55d6edd /src/_pytest/compat.py
parentce429381a74cb8c6cdaa49efd63973d44ff07813 (diff)
downloadpytest-f1d51ba1f57619e71cdf787ff1507be59a057c73.tar.gz
deprecate the pytest.collect module
changelog minimal unittest for collect module deprecations \!fixup - changelog typo
Diffstat (limited to 'src/_pytest/compat.py')
-rw-r--r--src/_pytest/compat.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py
index 1845d9d91..8aff8d57d 100644
--- a/src/_pytest/compat.py
+++ b/src/_pytest/compat.py
@@ -336,30 +336,6 @@ def safe_isclass(obj: object) -> bool:
return False
-COLLECT_FAKEMODULE_ATTRIBUTES = (
- "Collector",
- "Module",
- "Function",
- "Instance",
- "Session",
- "Item",
- "Class",
- "File",
- "_fillfuncargs",
-)
-
-
-def _setup_collect_fakemodule() -> None:
- from types import ModuleType
- import pytest
-
- # Types ignored because the module is created dynamically.
- pytest.collect = ModuleType("pytest.collect") # type: ignore
- pytest.collect.__all__ = [] # type: ignore # used for setns
- for attr_name in COLLECT_FAKEMODULE_ATTRIBUTES:
- setattr(pytest.collect, attr_name, getattr(pytest, attr_name)) # type: ignore
-
-
class CaptureIO(io.TextIOWrapper):
def __init__(self) -> None:
super().__init__(io.BytesIO(), encoding="UTF-8", newline="", write_through=True)