Skip to content

Commit 4655d30

Browse files
committed
test: tolerate dependency stderr warnings
1 parent 8da5386 commit 4655d30

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/interaction/transports/test_stdio.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import sys
2222
import tempfile
2323
from pathlib import Path
24+
from typing import TextIO, cast
2425

2526
import anyio
2627
import pytest
@@ -71,7 +72,7 @@ async def collect(params: LoggingMessageNotificationParams) -> None:
7172
# so the server module is measured. Empty when not running under coverage.
7273
env={key: value for key, value in os.environ.items() if key.startswith("COVERAGE_")},
7374
),
74-
errlog=errlog,
75+
errlog=cast(TextIO, errlog),
7576
)
7677

7778
with anyio.fail_after(10):
@@ -92,7 +93,8 @@ async def collect(params: LoggingMessageNotificationParams) -> None:
9293
# seeing it proves the process exited on its own rather than via the transport's terminate
9394
# escalation, without a timing-based assertion. The capture itself proves stderr passthrough:
9495
# the transport routes the child's stderr to the caller's `errlog` without consuming it.
95-
assert captured_stderr == snapshot("stdio-echo: clean exit\n")
96+
# Prerelease Python/lowest-direct dependency runs may print warnings before the server marker.
97+
assert captured_stderr.endswith("stdio-echo: clean exit\n")
9698

9799

98100
@requirement("transport:stdio:stream-purity")

0 commit comments

Comments
 (0)