如何使用 --timid 标志来覆盖鼻子

发布于 2024-08-31 02:13:20 字数 199 浏览 1 评论 0原文

我想使用 Ned Batchelder 的覆盖模块 运行“nosetests --with-coverage”,但是向覆盖模块传递 --timid 标志。 有没有办法(例如设置环境变量)使覆盖率与 --timid 一起运行?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧伤慢歌 2024-09-07 02:13:20

您有两个选择:

  1. 使用 .coveragerc 文件为覆盖率.py 提供选项

  2. 不要在鼻子内运行覆盖率,而是运行鼻子内部报道:

    覆盖运行 c:\python25\scripts\nosetests-script.py 
    

如果您不在 Windows 上,请原谅 Windows 语法)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文