You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module x was previously imported, but not measured (module-not-measured) #664
the problem seems to be related to the fact that you end up with ['coverage_test', 'coverage_test'] in self.source_pkgs_unmatched and coverage only removes on instance of it
If I set "--cov", this works fine - but then running pipx run tox -- src/coverage_test/tests/test_app.py the --cov consumes the path arg and I get CoverageWarning: Module src/coverage_test/tests/test_app.py was never imported.
Activity
graingert-coef commentedon Oct 17, 2024
the problem seems to be related to the fact that you end up with
['coverage_test', 'coverage_test']inself.source_pkgs_unmatchedand coverage only removes on instance of ithttps://github.com/nedbat/coveragepy/blob/fb2b49fb1beb810c6d7ee1cfbbf75a3ff8574fbf/coverage/inorout.py#L199
graingert-coef commentedon Oct 17, 2024
according to this
pytest-cov/src/pytest_cov/plugin.py
Lines 91 to 92 in 76fe2a7
https://github.com/graingert-coef/coverage-test/pull/1/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R25
https://github.com/graingert-coef/coverage-test/actions/runs/11384119440/job/31671155042?pr=1#step:4:33
in this case you end up with
['', 'coverage_test']inself.source_pkgs_unmatchedgraingert-coef commentedon Oct 17, 2024
If I set
"--cov",this works fine - but then runningpipx run tox -- src/coverage_test/tests/test_app.pythe--covconsumes the path arg and I getCoverageWarning: Module src/coverage_test/tests/test_app.py was never imported.