Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit ed5c71a

Browse files
committed
Use "new-style" pluggy hook wrapper
When all test failures are due to quarantined tests, we call pytest.exit() to force a successful exit. Newer versions of pluggy emit a `pluggy.PluggyTeardownRaisedWarning` warning due to using the "old-style" hook wrappers. This change switches to the new style, which eliminates the warning.
1 parent 1e31ff9 commit ed5c71a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytest_unflakable/_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def _build_test_suite_run_request(
586586
# Allows us to override the exit code if all the failures are quarantined. We need this to be a
587587
# wrapper so that the default hook still gets invoked and prints the summary line with the test
588588
# category counts.
589-
@pytest.hookimpl(hookwrapper=True, tryfirst=True)
589+
@pytest.hookimpl(wrapper=True, tryfirst=True)
590590
def pytest_sessionfinish(
591591
self,
592592
session: pytest.Session,

0 commit comments

Comments
 (0)