Commit 3de1062
committed
Tests(fix[coverage]): Stop the omit list depending on directory depth
`tests/*/test_*.py` reaches one directory below `tests/`, and `*` does not
cross a separator, so every test file nested deeper was measured as though it
were library code. Sixty-eight already were. Because those files execute, they
report near-total coverage and lift the figure rather than lowering it: the
suite reports 84% with them counted and 78% without, so 5,530 statements of
test code were worth six points of the library's score.
`**` matches any number of nested directories, so one pattern replaces the two
that enumerated levels, and a new directory cannot silently fall outside it.
The same collapse applies to the `scripts/` entries added alongside them, which
had the same one-level ceiling.
This is the third place in this tree where a path's depth was written down and
then stopped matching when a file moved -- the others being a PEP 723
`path = ".."` and the `parents[1]` lookups in the tests themselves. Each failed
silently rather than raising.
The reported figure drops six points because it stops averaging the library
with its own test suite.1 parent 301a2b8 commit 3de1062
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 158 | + | |
| 159 | + | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
| |||
0 commit comments