coverage.py

coverage.py: exclude files

How do I exclude entire files from coverage.py reports? According to the documentation you can exclude code by matching lines. I want to exclude entire files, so that the reports don't include 3rd party libraries. Am I missing something? Can it be done? ...

Is it possible exclude test directories from coverage.py reports?

I'm kind of a rookie with python unit testing, and particularly coverage.py. Is it desirable to have coverage reports include the coverage of your actual test files? Here's a screenshot of my HTML report as an example. You can see that the report includes tests/test_credit_card. At first I was trying to omit the tests/ directory from...

How to omit using python coverage lib ?

I would like to omit some module that are in some particular directory : eggs and bin coverage -r -i --omit=/usr/lib/,/usr/share/,eggs,bin Name Stmts Exec Cover ----------------------------------------------------------------------------------------- bin/test ...

How do I generate coverage xml report for a single package?

I'm using nose and coverage to generate coverage reports. I only have one package right now, ae, so I specify to only cover that: nosetests -w tests/unit --with-xunit --with-coverage --cover-package=ae And here are the results, which look good: Name Stmts Exec Cover Missing -----------------------------------------...

When would my Python test suite file coverage not be 100%?

We are using Hudson and coverage.py to report the code coverage of our test suite. Hudson breaks down coverage into: packages files classes lines conditionals Coverage.py only reports coverage on files executed/imported during the tests, and so it seems is oblivious to any files not executed during the tests. Is there ever an instanc...