summaryrefslogtreecommitdiff
path: root/src/_pytest/hookspec.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2020-03-03 22:58:14 +0100
committerGitHub <noreply@github.com>2020-03-03 18:58:14 -0300
commit9fd71d6fe0a82d0cee90bbc9057f7ed31395c19a (patch)
treea7becd563cb9e477c6eb98f88e9a4f26758d88cf /src/_pytest/hookspec.py
parentb11bfa106cb413773292a52e903e3b3ab4f62b95 (diff)
downloadpytest-9fd71d6fe0a82d0cee90bbc9057f7ed31395c19a.tar.gz
fix #571: deprecate pytest_collect_directory as ... (#6847)
Deprecate pytest_collect_directory Fix #571 Co-authored-by: Daniel Hahler <github@thequod.de>
Diffstat (limited to 'src/_pytest/hookspec.py')
-rw-r--r--src/_pytest/hookspec.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py
index 62e2155a2..1e16d092d 100644
--- a/src/_pytest/hookspec.py
+++ b/src/_pytest/hookspec.py
@@ -4,6 +4,7 @@ from typing import Optional
from pluggy import HookspecMarker
+from .deprecated import COLLECT_DIRECTORY_HOOK
from _pytest.compat import TYPE_CHECKING
if TYPE_CHECKING:
@@ -205,7 +206,7 @@ def pytest_ignore_collect(path, config):
"""
-@hookspec(firstresult=True)
+@hookspec(firstresult=True, warn_on_impl=COLLECT_DIRECTORY_HOOK)
def pytest_collect_directory(path, parent):
""" called before traversing a directory for collection files.