Use pytest.hookimpl instead of pytest.mark.hookwrapper

pytest.mark.hookwrapper seems to be used nowhere in the _pytest package.
This commit is contained in:
Thomas Hisch 2017-09-15 04:43:51 +02:00
parent d13e17cf51
commit 08f6b5f4ea
1 changed files with 4 additions and 4 deletions

View File

@ -399,22 +399,22 @@ class LoggingPlugin(object):
log = log_handler.stream.getvalue().strip()
item.add_report_section(when, 'log', log)
@pytest.mark.hookwrapper
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_setup(self, item):
with self._runtest_for(item, 'setup'):
yield
@pytest.mark.hookwrapper
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call(self, item):
with self._runtest_for(item, 'call'):
yield
@pytest.mark.hookwrapper
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_teardown(self, item):
with self._runtest_for(item, 'teardown'):
yield
@pytest.mark.hookwrapper
@pytest.hookimpl(hookwrapper=True)
def pytest_runtestloop(self, session):
"""Runs all collected test items."""
with catching_logs(self.log_cli_handler,