nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 396 forks source link

query: any way to get coverage report without running tests #1013

Closed p00j4 closed 8 years ago

p00j4 commented 8 years ago

with --with-coverage or --with-xcover Is it even possible to get complete coverage report without executing test? i'm just wondering if i'm asking too much which is logically not feasible. there is "--collect-only" flag but it just captures test names & so the coverage is not the accurate one (very low as it can't go inside function definition)

p00j4 commented 8 years ago

@jpellerin any pointers would be helpful

jszakmeister commented 8 years ago

The issue tracker isn't the place to be asking questions--the mailing list is a better place for it. Also, Nose is unmaintained these days. No one has stepped up to take maintainership and Nose2 is the successor, so you'd do better to make the switch now.

To answer your question, no it is not possible to get a coverage report without running the tests. The coverage data that makes the report comes from executing the tests (the coverage tool instruments the code and measures what has been executed). Without that data, you really can't put together a meaningful report.