简体   繁体   English

如何使用Python单元测试隐藏“ Ys中的Ran X测试”

[英]How to hide “Ran X test in Ys” with Python unittests

I am running a lot of selenium grid2 tests and am using unittests to assist me. 我正在运行许多Selenium grid2测试,并使用单元测试来帮助我。

However, I would like to suppress the printing of 但是,我想禁止打印

.
----------------------------------------------------------------------
Ran 1 test in 0.002s

OK

Does anyone know of a setting I can alter in order to fix this? 有人知道我可以更改以解决此问题的设置吗? It really bugs me. 这真的让我很烦。

Thank you. 谢谢。

You can choose what is outputted by a module by going into it's code and changing it. 您可以通过进入模块的代码并对其进行更改来选择模块输出的内容。

In this case just search for what you don't want to be printed and remove the code that prints it. 在这种情况下,只需搜索您不想打印的内容并删除打印它的代码即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM