Making py.test, coverage and tox work together: __init__.py in tests folder?
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..
Use --cov {envsitepackagesdir}/<your-package-name>
in tox.ini.