如何使用nosetests从输出中删除调试

发布于 2024-09-01 23:29:57 字数 135 浏览 2 评论 0原文

我正在使用鼻子测试来测试几个脚本。但是当我运行鼻子测试时,它会打印出日志记录。我知道它将日志信息存储到 sys.stderr 中。有谁知道如何阻止它输出到屏幕?

我只是希望测试结果像正常运行单元测试时一样输出。

感谢您的帮助

I am using nosetests to test several scripts. But when I run nosetests it prints out the logging. I know it stores logging info into sys.stderr. Does anyone know how to stop this from outputting to the screen?

I just want the test results to output like when you run unittest normally.

Thanks for any help

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

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

发布评论

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

评论(1

北城挽邺 2024-09-08 23:29:59

找到答案,

nosetests test* --nologcapture --nocapture

在命令行中运行它。

谢谢

Found the answer,

nosetests test* --nologcapture --nocapture

Run this in the command line.

Thanks

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