2014-11-21 108 views
1

我有我的Python应用程序构建为一个目录如下:nosetests - 不包括覆盖报告

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

我正在nosetests如下:

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

然而,在覆盖报告中指出nosetests打印结束时,我仍然从“其他”输入。如何从覆盖率报告中排除“其他”?

回答

0

很可能你的testsproj指的是other的python代码,因此它会将它编译成报告。您可以看到调试覆盖率插件打印输出:

nosetests --with-coverage --cover-package=proj -vv tests -l nose.plugins.cover 
+0

是的,proj引用'其他'python代码。 “其他”实际上是一组第三方python库。这就是为什么我想将它从覆盖报告中排除。 – 2014-11-26 00:47:12