Suppressing Cherrypy output while running unit tests using the nose

I use cherrypy to build a web server, and I use nose to perform my unit tests. However, there are many debugging noises that the nose captures and prints to stdout, even when I use -nologcapture, especially the ink log messages. This makes reading the test results difficult.

I thought that:

def setUp(self):
   cherrypy.config.update({ "server.logToScreen" : False })
   cherrypy.config.update({'log.screen': False})

along with the --nologcapture option will suppress these messages, but apparently this is not so.

Does anyone know how to get rid of these messages and get a nice clean test result, please?

+3
source share
2 answers

, CherryPy , 3.x , . , :

cherrypy.config.update({ "environment": "embedded" })

, CherryPy Twill.

+4

CherryPy 3.1.2. 3.2.2, - .

+1

Source: https://habr.com/ru/post/1727484/


All Articles