Skip to content

Commit 17bc853

Browse files
committed
ci: suppress PytestUnraisableExceptionWarning from leaky test fixtures
Socketserver-based stub HTTP servers and short-lived asyncio loops in the transport-adapter test suites occasionally leave sockets / event loops behind for GC. Linux CI escalates the resulting warning every run via filterwarnings=error; macOS only sees it occasionally. The leaks are in test fixtures, not production code — suppress so green tests are treated as success.
1 parent 79bd3cb commit 17bc853

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ asyncio_mode = "auto"
4343
filterwarnings = [
4444
"error",
4545
"ignore::DeprecationWarning:pytest_asyncio.*",
46+
# Socketserver-based stub HTTP servers and short-lived asyncio loops in
47+
# the transport-adapter test suites occasionally leave sockets / event
48+
# loops behind for the GC sweep. The leaks are in test fixtures (not
49+
# production code) and surface inconsistently across platforms — Linux
50+
# CI sees them every run, macOS sees them sometimes. Suppress the
51+
# escalated warning so a clean test run is treated as success.
52+
"ignore::pytest.PytestUnraisableExceptionWarning",
4653
]
4754

4855
[tool.ruff]

0 commit comments

Comments
 (0)