Commit b3e39ac
committed
fix(tests): 3.14 phantom branch arcs, Windows Proactor transport leak
Two more cases where running in-process exposes issues subprocess hid:
1. Python 3.14 coverage: phantom ->exit arcs on nested async with CMs.
The WITH_EXCEPT_START suppression-check branch (did __aexit__
suppress?) gets misattributed through the exception table to outer
CM lines when the inner body yields. Previously the SSE security
tests never ran on 3.14 (uvicorn thread crashed before server
started) so this didn't surface. Add # pragma: no branch to the two
specific CM lines coverage flags.
2. Windows 3.13 lowest-direct: Proactor socket transports from MCP
client connections don't always close before GC when clients
disconnect abruptly from the module-scoped server. The transport
__del__ ResourceWarning is collected by pytest's unraisable hook
during a later test. Older httpx (lowest-direct) has worse transport
cleanup than the locked version. Subprocess-based tests hid this —
resource warnings in a subprocess die with the subprocess. Add the
same PytestUnraisableExceptionWarning filter that test_sse.py uses.1 parent 56fcfe0 commit b3e39ac
3 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
124 | 131 | | |
125 | | - | |
126 | | - | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
0 commit comments