Spaces:
Running
Running
zzstoatzz commited on
Commit ·
abf3294
1
Parent(s): f8ac703
more specific
Browse files
tests/integration_tests/conftest.py
CHANGED
|
@@ -3,7 +3,7 @@ import pytest
|
|
| 3 |
|
| 4 |
@pytest.hookimpl(hookwrapper=True)
|
| 5 |
def pytest_runtest_makereport(item, call):
|
| 6 |
-
"""Convert BrokenResourceError failures to skips"""
|
| 7 |
outcome = yield
|
| 8 |
report = outcome.get_result()
|
| 9 |
|
|
@@ -14,8 +14,10 @@ def pytest_runtest_makereport(item, call):
|
|
| 14 |
and not hasattr(report, "wasxfail")
|
| 15 |
and call.excinfo
|
| 16 |
and call.excinfo.typename == "BrokenResourceError"
|
|
|
|
| 17 |
):
|
| 18 |
-
#
|
|
|
|
| 19 |
report.outcome = "skipped"
|
| 20 |
report.longrepr = (
|
| 21 |
"/Users/nate/github.com/jlowin/fastmcp/tests/integration_tests/conftest.py",
|
|
|
|
| 3 |
|
| 4 |
@pytest.hookimpl(hookwrapper=True)
|
| 5 |
def pytest_runtest_makereport(item, call):
|
| 6 |
+
"""Convert BrokenResourceError failures to skips only for GitHub rate limits"""
|
| 7 |
outcome = yield
|
| 8 |
report = outcome.get_result()
|
| 9 |
|
|
|
|
| 14 |
and not hasattr(report, "wasxfail")
|
| 15 |
and call.excinfo
|
| 16 |
and call.excinfo.typename == "BrokenResourceError"
|
| 17 |
+
and item.module.__name__ == "tests.integration_tests.test_github_mcp_remote"
|
| 18 |
):
|
| 19 |
+
# Only skip if the test is in the GitHub remote test module
|
| 20 |
+
# This prevents catching unrelated BrokenResourceErrors
|
| 21 |
report.outcome = "skipped"
|
| 22 |
report.longrepr = (
|
| 23 |
"/Users/nate/github.com/jlowin/fastmcp/tests/integration_tests/conftest.py",
|