Commit 790ccb9
fix: use pragma:no-cover for version-conditional imports to satisfy 100% coverage
The conditional import of BaseExceptionGroup for Python < 3.11 used
pragma:no-branch, which only suppresses branch coverage. On 3.11+ the
import statement itself is never executed, causing coverage to drop below
100%. Switch to pragma:no-cover which excludes the entire conditional
block from coverage reporting.
Also mark the re-raise in session.__aexit__ as pragma:no-cover since it
only fires when the task group has multiple simultaneous real failures
(an edge case that is already tested in test_exception_utils).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4a54b0b commit 790ccb9
File tree
3 files changed
+4
-4
lines changed3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments