Python subroutine coverage

when I google, I see a few of the same issue but no solution,

the problem is I have a python package with tests based on unittest , pytest as test runner and plugins like pytest-cov to support the coverage , it all works fine on local machine, all tests are executed and pass, coverage is calculated for all tests, including CLI tests using subprocess.check_output .

I’m a little stuck, any help would be good @montana?

It seems like tox is here to blame from the cursory information I have.

So let’s say you have a config file that didn’t have the -e flag in it, this could cause this exact issues when it comes to Python subroutines and Travis.

Try something like:

  coverage erase
    pip install -e .

I think what you’ll find is the pip install -e . is absolutely the key here and tox is to blame.

1 Like