File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -71,3 +71,7 @@ class RemovedInPytest4Warning(DeprecationWarning):
71
71
"because it affects the entire directory tree in a non-explicit way.\n "
72
72
"Please move it to the top level conftest file instead."
73
73
)
74
+
75
+ PYTEST_NAMESPACE = RemovedInPytest4Warning (
76
+ "pytest_namespace is deprecated and will be removed soon"
77
+ )
Original file line number Diff line number Diff line change 1
1
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """
2
2
3
3
from pluggy import HookspecMarker
4
- from .deprecated import RemovedInPytest4Warning
4
+ from .deprecated import PYTEST_NAMESPACE
5
+
5
6
6
7
hookspec = HookspecMarker ("pytest" )
7
8
@@ -23,12 +24,7 @@ def pytest_addhooks(pluginmanager):
23
24
"""
24
25
25
26
26
- @hookspec (
27
- historic = True ,
28
- warn_on_impl = RemovedInPytest4Warning (
29
- "pytest_namespace is deprecated and will be removed soon"
30
- ),
31
- )
27
+ @hookspec (historic = True , warn_on_impl = PYTEST_NAMESPACE )
32
28
def pytest_namespace ():
33
29
"""
34
30
return dict of name->object to be made globally available in
You can’t perform that action at this time.
0 commit comments