What numbers can you pass as verbosity in running Python Unit Test Suites?

前端 未结 1 899
無奈伤痛
無奈伤痛 2021-01-30 15:58

The Python unittest framework has a concept of verbosity that I can\'t seem to find defined anywhere. For instance, I\'m running test cases like this (like in the documentation)

相关标签:
1条回答
  • 2021-01-30 16:37

    You only have 3 different levels:

    • 0 (quiet): you just get the total numbers of tests executed and the global result
    • 1 (default): you get the same plus a dot for every successful test or a F for every failure
    • 2 (verbose): you get the help string of every test and the result

    You can use command line args rather than the verbosity argument: --quiet and --verbose which would do something similar to passing 0 or 2 to the runner.

    0 讨论(0)
提交回复
热议问题