1

I have my python app structured as follows:

proj
   - comp1
   - comp2
tests
   - comp1
   - comp2
other
   - contains some python code

I am running nosetests as following:

nosetests --with-coverage  --cover-package=proj --exclude-dir=other -v tests

However, in the coverage report that nosetests prints at the end I still entries from 'other'. How do I exclude 'other' from the coverage report?

4

1 回答 1

0

很可能您testsproj正在引用otherpython 代码,因此,它会生成报告。你可以看到调试覆盖插件打印输出:

nosetests --with-coverage  --cover-package=proj -vv tests -l nose.plugins.cover
于 2014-11-21T23:35:57.873 回答