Skip to content

Commit d1c8560

Browse files
Zelys-DFKHclaude
andcommitted
fix(mcpserver): add lax no cover pragmas for subprocess-only coverage paths
Lines 306-308 (match transport/stdio case) and 860-867 (run_stdio_async) are only covered via subprocess in test_1027_win_unreachable_cleanup.py. Coverage 7.10.7 (lowest-direct) does not capture subprocess coverage on Windows+Python 3.13, causing a spurious fail_under=100 failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e187a74 commit d1c8560

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mcp/server/mcpserver/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def run(
303303
if transport not in TRANSPORTS.__args__: # type: ignore # pragma: no cover
304304
raise ValueError(f"Unknown transport: {transport}")
305305

306-
match transport:
306+
match transport: # pragma: lax no cover
307307
case "stdio":
308308
anyio.run(self.run_stdio_async)
309309
case "sse": # pragma: no cover
@@ -857,7 +857,7 @@ def decorator( # pragma: no cover
857857

858858
return decorator # pragma: no cover
859859

860-
async def run_stdio_async(self) -> None:
860+
async def run_stdio_async(self) -> None: # pragma: lax no cover
861861
"""Run the server using stdio transport."""
862862
async with stdio_server() as (read_stream, write_stream):
863863
await self._lowlevel_server.run(

0 commit comments

Comments
 (0)