Fix rate limit detection during teardown phase (#2757)

This commit is contained in:
Jeremiah Lowin 2025-12-26 15:50:11 -05:00 committed by GitHub
commit 4519ef734d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,9 +56,9 @@ def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
# Only process actual failures during the call phase, not xfails
# Only process actual failures during the call or teardown phase, not xfails
if (
report.when == "call"
report.when in ("call", "teardown")
and report.failed
and not hasattr(report, "wasxfail")
and item.module.__name__ == "tests.integration_tests.test_github_mcp_remote"