简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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