Commit 618be64
committed
ci(#2484): pragma: no cover on defensive teardown branches
Second CI round got coverage up to 99.97% but the last uncovered
lines are defensive cleanup paths that normal teardown does not
exercise and that do not warrant a dedicated test each:
- `_on_done` callback's "task cancelled" early-return (normal
teardown exits the reader/writer cleanly through stream-close,
not via explicit cancellation).
- `task.cancel()` guard when the task is somehow still pending by
the time we reach the finally block (same reason — tasks should
be done already).
- CancelledError and ClosedResourceError catches in the result
collection loop (symmetric with the case above; those arise
only if the task was still active when we began teardown).
Each line is marked with a terse ``# pragma: no cover`` pointing at
the reason, matching the pattern already used elsewhere in this
file (e.g. ``except Exception: # pragma: no cover`` on line 143
inside ``_on_done``).1 parent d546633 commit 618be64
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments