Making py.test, coverage and tox work together: __init__.py in tests folder? Making py.test, coverage and tox work together: __init__.py in tests folder? python python

Making py.test, coverage and tox work together: __init__.py in tests folder?


Use --cov {envsitepackagesdir}/<your-package-name> in tox.ini.


See: Using py.test with coverage doesn't include imports

I got rid of using pytest-cov and run coverage outright instead..

Also noticed with pytest, I did need the blank __init__.py in my test directory to function correctly. There is probably a reason for it somewhere.

I realize this is a couple of years old, but in case someone else comes across this..