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:
parent
d13e17cf51
commit
08f6b5f4ea
|
@ -399,22 +399,22 @@ class LoggingPlugin(object):
|
||||||
log = log_handler.stream.getvalue().strip()
|
log = log_handler.stream.getvalue().strip()
|
||||||
item.add_report_section(when, 'log', log)
|
item.add_report_section(when, 'log', log)
|
||||||
|
|
||||||
@pytest.mark.hookwrapper
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtest_setup(self, item):
|
def pytest_runtest_setup(self, item):
|
||||||
with self._runtest_for(item, 'setup'):
|
with self._runtest_for(item, 'setup'):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
@pytest.mark.hookwrapper
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtest_call(self, item):
|
def pytest_runtest_call(self, item):
|
||||||
with self._runtest_for(item, 'call'):
|
with self._runtest_for(item, 'call'):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
@pytest.mark.hookwrapper
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtest_teardown(self, item):
|
def pytest_runtest_teardown(self, item):
|
||||||
with self._runtest_for(item, 'teardown'):
|
with self._runtest_for(item, 'teardown'):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
@pytest.mark.hookwrapper
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtestloop(self, session):
|
def pytest_runtestloop(self, session):
|
||||||
"""Runs all collected test items."""
|
"""Runs all collected test items."""
|
||||||
with catching_logs(self.log_cli_handler,
|
with catching_logs(self.log_cli_handler,
|
||||||
|
|
Loading…
Reference in New Issue