Skip test_warning_captured_deprecated_in_pytest_6 in pytest>=7.1

This commit is contained in:
Bruno Oliveira
2021-12-10 08:31:00 -03:00
parent 5f78c7155e
commit c76d5622f1
2 changed files with 9 additions and 0 deletions

View File

@@ -294,6 +294,8 @@ class DSession:
def worker_warning_captured(self, warning_message, when, item):
"""Emitted when a node calls the pytest_warning_captured hook (deprecated in 6.0)."""
# This hook as been removed in pytest 7.1, and we can remove support once we only
# support pytest >=7.1.
kwargs = dict(warning_message=warning_message, when=when, item=item)
self.config.hook.pytest_warning_captured.call_historic(kwargs=kwargs)