I'm having trouble getting the code coverage numbers to be reported correctly in my add-on.
I run:
bin/coverage run bin/test
then:
> bin/coverage report
Name Stmts Miss Cover
-------------------------------------------------------------------------------
src/collective/__init__.py 1 0 100%
src/collective/restapi/__init__.py 1 0 100%
src/collective/restapi/navigationtree/__init__.py 3 0 100%
src/collective/restapi/navigationtree/browser/__init__.py 0 0 100%
src/collective/restapi/navigationtree/browser/get.py 77 56 27%
src/collective/restapi/navigationtree/interfaces.py 3 0 100%
src/collective/restapi/navigationtree/setuphandlers.py 6 0 100%
-------------------------------------------------------------------------------
TOTAL 91 56 38%
That 27% in src/collective/restapi/navigationtree/browser/get.py is basically just static coverage (python compiling the file without executing any of the callables). But that's BS. I put breakpoints in all the methods, and they do get hit when the tests run, so the number should be much higher.
If anyone has any idea why or what I'm doing wrong, I'd appreciate any hints.
Thanks!