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

Commit

Permalink
Use "new-style" pluggy hook wrapper
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ramosbugs committed Mar 15, 2024
1 parent 1e31ff9 commit ed5c71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytest_unflakable/_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def _build_test_suite_run_request(
# Allows us to override the exit code if all the failures are quarantined. We need this to be a
# wrapper so that the default hook still gets invoked and prints the summary line with the test
# category counts.
@pytest.hookimpl(hookwrapper=True, tryfirst=True)
@pytest.hookimpl(wrapper=True, tryfirst=True)
def pytest_sessionfinish(
self,
session: pytest.Session,
Expand Down

0 comments on commit ed5c71a

Please sign in to comment.