Commit 3483015
committed
ci(#2484): drop pragmas on lines strict-no-cover says are reached
Third CI round: coverage reached 100.00% on the previous commit, but
the project also runs ``strict-no-cover`` which complains when a
line is marked ``# pragma: no cover`` yet actually gets hit by the
test suite (it prevents coverage rot from creeping in under pragma
cover).
It flagged two of my pragmas:
src/mcp/client/stdio.py:161 — `except asyncio.CancelledError:`
src/mcp/client/stdio.py:163 — `except anyio.ClosedResourceError:`
Both are reached on Linux during the normal teardown of the new
stdio tests, so the pragma was wrong. Removed them. (The Windows
runs did not hit these branches — which explains why Windows matrix
passed last round but Linux did not; strict-no-cover runs on the
Linux jobs.)
Kept the pragmas on lines 131, 155, 166 — those are the defensive
branches that still are not reached by any existing test on either
platform and still warrant the marker.
15 stdio tests pass locally; ruff + pyright clean.1 parent 618be64 commit 3483015
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
0 commit comments