I know Eclipse + PyDev has an option Run As
=> 3 Python Coverage
. But all it reports is:
Ran 6 tests in 0.001s
OK
And it says nothing about code coverage. How to get a code coverage report in Pydev?
Eclipse can check your code coverage when it runs your JUnit testing class. This means that it can show you what statements were executed in at least one test case and what ones weren't. For an if-statement, it will tell you whether there was a test case for the condition to be false and another for it to be true.
Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests.
Actually this is a really nice feature, didn't know about it before :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With