Skip to content

Commit e3ff8b5

Browse files
davidparssonclaude
andcommitted
test: Drop diagnostics and unused coverage path mapping
conftest.py (root) is the actual fix; remove the DIAG print and the [paths]/relative_files left over from the abandoned site-packages measurement approach. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a82d918 commit e3ff8b5

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

.coveragerc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
[run]
2-
relative_files = true
3-
4-
[paths]
5-
source =
6-
injector/
7-
*/site-packages/injector/
8-
91
[report]
102
exclude_also =
113
if TYPE_CHECKING:

conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import sys
2-
3-
4-
def pytest_collection_finish(session):
5-
m = sys.modules.get("injector")
6-
print("DIAG executed-injector:", getattr(m, "__file__", m))
1+
# This file exists so that pytest inserts the repository root at the front of
2+
# sys.path before coverage starts measuring. Without it, running the `pytest`
3+
# console script with the package installed makes `--cov=injector` bind to the
4+
# installed site-packages copy, while the tests import the working-tree copy --
5+
# so no executed lines are measured and coverage is reported as 0%.
6+
# See https://github.com/pytest-dev/pytest-cov/issues/98

0 commit comments

Comments
 (0)