diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 3f7c0674991..051eda79d3c 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -270,6 +270,7 @@ def parse_hookimpl_opts(self, plugin, name): opts = {} if opts is not None: # TODO: DeprecationWarning, people should use hookimpl + # https://github.com/pytest-dev/pytest/issues/4562 known_marks = {m.name for m in getattr(method, "pytestmark", [])} for name in ("tryfirst", "trylast", "optionalhook", "hookwrapper"): @@ -286,6 +287,7 @@ def parse_hookspec_opts(self, module_or_class, name): if name.startswith("pytest_"): # todo: deprecate hookspec hacks + # https://github.com/pytest-dev/pytest/issues/4562 known_marks = {m.name for m in getattr(method, "pytestmark", [])} opts = { "firstresult": hasattr(method, "firstresult") diff --git a/src/_pytest/python.py b/src/_pytest/python.py index a508dbe2441..48a50178f65 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1290,6 +1290,8 @@ def __init__( self.keywords.update(keywords) # todo: this is a hell of a hack + # https://github.com/pytest-dev/pytest/issues/4569 + self.keywords.update( dict.fromkeys( [