How to Fix Python Nose: Coverage not available: unable to import coverage module
Have you tried pip install coverage? The coverage plugin depends on separate coverage module, which is not a nose’s dependency, so needs to be installed manually.
Have you tried pip install coverage? The coverage plugin depends on separate coverage module, which is not a nose’s dependency, so needs to be installed manually.
Coverage looks for a .coverage file to read and generate that report for you. Py.test on its own does not create one. You need py.test plugin for coverage: pip install pytest-cov If you already have it, then you can run both at once like this: py.test test.py –cov=sample.py Which means run test module test.py and … Read more
coverage html –omit=”*/test*” -d tests/coverage