Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML report does not report on all code units #11

Closed
nedbat opened this issue Jun 26, 2009 · 1 comment
Closed

HTML report does not report on all code units #11

nedbat opened this issue Jun 26, 2009 · 1 comment
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Jun 26, 2009

Originally reported by fniessink (Bitbucket: fniessink, GitHub: fniessink)


The HTML report does not report on code units that are not relative to the invoked script.

This is inconvenient in the following setup:

src/
src/whatever.py
tests/
tests/my_testrunner.py
tests/some_unittest_invoked_by_testrunner.py

Invoking coverage as follows generates a coverage HTML report that does not include whatever.py:

cd tests; rm .coverage; coverage -x my_testrunner.py; coverage -b -d coverage.out

Invoking coverage as follows generates a coverage text report that does include whatever.py:

cd tests; rm .coverage; coverage -x my_testrunner.py; coverage -r

Removing the lines in report.py:Reporter.report_files() that skip code_units that are not relative fixes the issue for me. See attached patch.


@nedbat
Copy link
Owner Author

nedbat commented Sep 27, 2009

Fixed in <<changeset cfc880a6c4d7 (bb)>>.

@nedbat nedbat closed this as completed Sep 27, 2009
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
agronholm added a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant