简体   繁体   English

控制Flask测试的详细程度

[英]Control the verbosity of Flask's tests

I'm running tests for my Flask app from Bash using python manage.py test . 我正在使用python manage.py test从Bash运行针对Flask应用程序的python manage.py test In addition to failures and errors, the console prints out 除了失败和错误,控制台还会打印出

    test_name (test_file.TestClass) ... ok

for every single test. 每个测试。 That's super annoying when you have a lot of tests. 当您进行大量测试时,这真令人讨厌。 How can I control the verbosity of the printout? 如何控制打印输出的详细程度?

@jonrsharpe was right. @jonrsharpe是正确的。 I didn't realize that the project was using Flask-Script, which I guess is the reason for the manage.py file. 我没有意识到该项目使用的是Flask-Script,我想这是manage.py文件的原因。 Flask-Script calls unittest with a default verbosity. Flask-Script以默认的详细程度调用unittest。 I reduced the default verbosity and that culled the extra output. 我降低了默认的详细程度,从而淘汰了额外的输出。

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

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