Commit 84a499f
Make empty-file test tolerant of a real Python-version behavior split
An empty module compiles to a single line-1 entry on Python 3.9/3.10
(findlinestarts -> (0, 1)) but to (0, 0) on 3.11+, which slipcover's
own line-collection already filters out as non-real. So an empty .py
file legitimately has 1 trivially-executed line on 3.9/3.10 and 0 on
3.11+ -- both correct, and not something to "fix" in slipcover itself.
The test's hardcoded LF:0/LH:0 assumption only held on 3.11+. Assert
the actual invariant instead: no DA: line reports a zero hit count,
i.e. nothing is missing, regardless of the exact (version-dependent)
line count.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 86208f2 commit 84a499f
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1605 | 1605 | | |
1606 | 1606 | | |
1607 | 1607 | | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1608 | 1613 | | |
1609 | 1614 | | |
1610 | 1615 | | |
| |||
1615 | 1620 | | |
1616 | 1621 | | |
1617 | 1622 | | |
1618 | | - | |
1619 | | - | |
| 1623 | + | |
1620 | 1624 | | |
1621 | 1625 | | |
1622 | 1626 | | |
| |||
0 commit comments