fix #571: deprecate pytest_collect_directory as ... (#6847)

Deprecate pytest_collect_directory

Fix #571

Co-authored-by: Daniel Hahler <github@thequod.de>
This commit is contained in:
Ronny Pfannschmidt
2020-03-03 22:58:14 +01:00
committed by GitHub
parent b11bfa106c
commit 9fd71d6fe0
5 changed files with 12 additions and 1 deletions

View File

@@ -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.