add documented hookimpl_opts and hookspec_opts decorators

so that one doesn't have to use pytest.mark or function-attribute setting anymore

--HG--
branch : more_plugin
This commit is contained in:
holger krekel
2015-04-25 11:29:11 +02:00
parent bbbb6dc2e3
commit d2a5c7f99b
21 changed files with 150 additions and 47 deletions

View File

@@ -140,7 +140,7 @@ class TestCaseFunction(pytest.Function):
if traceback:
excinfo.traceback = traceback
@pytest.mark.tryfirst
@pytest.hookimpl_opts(tryfirst=True)
def pytest_runtest_makereport(item, call):
if isinstance(item, TestCaseFunction):
if item._excinfo:
@@ -152,7 +152,7 @@ def pytest_runtest_makereport(item, call):
# twisted trial support
@pytest.mark.hookwrapper
@pytest.hookimpl_opts(hookwrapper=True)
def pytest_runtest_protocol(item):
if isinstance(item, TestCaseFunction) and \
'twisted.trial.unittest' in sys.modules: