Skip to content

Commit cf29fb2

Browse files
committed
Clarify stdio coverage comments
1 parent dcf3e3c commit cf29fb2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/interaction/transports/_stdio_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async def main() -> None:
6060
# Save subprocess coverage before the marker so forced teardown cannot lose it.
6161
cov = getattr(coverage.process_startup, "coverage", None)
6262
if cov is not None: # pragma: no branch
63-
# Stop tracing before the final save.
63+
# Leave nothing for coverage's atexit hook to rewrite if teardown is interrupted.
6464
cov.stop()
6565
cov.save() # pragma: lax no cover - untraced: stop() above already ended measurement
6666
# The test uses this marker to distinguish clean exit from termination.

tests/interaction/transports/test_stdio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def collect(params: LoggingMessageNotificationParams) -> None:
5858
command=sys.executable,
5959
args=["-m", _stdio_server.__name__],
6060
cwd=str(_REPO_ROOT),
61-
# Preserve subprocess coverage and suppress an AnyIO 3.14 import warning.
61+
# Preserve subprocess coverage and suppress anyio's `SyntaxWarning` on Python 3.14.
6262
env={key: value for key, value in os.environ.items() if key.startswith("COVERAGE_")}
6363
| {"PYTHONWARNINGS": "ignore::SyntaxWarning"},
6464
),

0 commit comments

Comments
 (0)