How to use nose coverage with --timid flag

2019-05-10 09:01发布

I'd like to run "nosetests --with-coverage" using Ned Batchelder's coverage module, but passing the coverage module the --timid flag. Is there a way (e.g. setting an environment variable) to make coverage run with --timid?

1条回答
闹够了就滚
2楼-- · 2019-05-10 09:47

You've got two options:

  1. Use a .coveragerc file to provide options to coverage.py

  2. Instead of running coverage inside nose, run nose inside coverage:

    coverage run c:\python25\scripts\nosetests-script.py 
    

(sorry for the Windows syntax if you aren't on Windows)

查看更多
登录 后发表回答