File tree Expand file tree Collapse file tree
tests/interaction/transports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import sys
2222import tempfile
2323from pathlib import Path
24+ from typing import TextIO , cast
2425
2526import anyio
2627import 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" )
You can’t perform that action at this time.
0 commit comments