remove most of markertransfer

keywords are still a big issue
This commit is contained in:
Ronny Pfannschmidt
2018-12-19 16:00:59 +01:00
parent 58fc918d0a
commit 9f9f6ee48b
8 changed files with 52 additions and 421 deletions

View File

@@ -270,8 +270,11 @@ class PytestPluginManager(PluginManager):
opts = {}
if opts is not None:
# TODO: DeprecationWarning, people should use hookimpl
known_marks = {m.name for m in getattr(method, "pytestmark", [])}
for name in ("tryfirst", "trylast", "optionalhook", "hookwrapper"):
opts.setdefault(name, hasattr(method, name))
opts.setdefault(name, hasattr(method, name) or name in known_marks)
return opts
def parse_hookspec_opts(self, module_or_class, name):