Commit 5b9e472
fix: use coverage combine with path mapping for accurate diff-cover
Per-package coverage.xml files stored source filenames relative to each
package directory, making diff-cover unable to match them against git
diff paths. This caused diff-cover to report artificially low coverage
despite tests achieving 100% coverage on the changed lines.
- Enable relative_files in coverage.run config
- Add coverage.paths mapping so coverage combine can unify per-package
paths into paths relative to the python/ workspace root
- Move skip_empty to coverage.report where it belongs
- Replace per-file diff-cover invocation with coverage combine followed
by diff-cover on a single merged coverage.xml
- Remove redundant PYTEST_ADDOPTS override from CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 43ccb52 commit 5b9e472
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
132 | 130 | | |
133 | 131 | | |
134 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
0 commit comments