I’m trying to make sense of code coverage. I installed pytest-cov. I have no idea of what I’m doing: This is the result.
coverage report -m scannerex32.py test_scannerex32.py
Name Stmts Miss Cover Missing
---------------------------------------------------
scannerex32.py 52 41 21% 5-7, 10, 15-19, 22-31, 34-44, 47-50, 55-62, 66
test_scannerex32.py 19 19 0% 1-41
---------------------------------------------------
TOTAL 71 60 15%
And then I switched the order of the arguments (script names).
coverage report -m test_scannerex32.py scannerex32.py
Name Stmts Miss Cover Missing
---------------------------------------------------
scannerex32.py 52 2 96% 43, 50
test_scannerex32.py 19 0 100%
---------------------------------------------------
TOTAL 71 2 97%
What is going on here? What tutorial/documentation should I be reading to make sense of this report? I’ve read parts of the docs:
https://coverage.readthedocs.io/en/coverage-4.5.1/cmd.html#execution
https://coverage.readthedocs.io/en/coverage-4.5.1/howitworks.html
That’s the most helpful documentation I’ve found so far.