How to know time spent on each test when using unittest?

前端 未结 7 1382
-上瘾入骨i
-上瘾入骨i 2021-02-05 00:37

Unittest presents only total time spent on running all tests but does not present time spent on each test separately.

How to add timing of each test when using unittest?

7条回答
  •  执笔经年
    2021-02-05 01:03

    You can use pytest with --durations=0 and it will give you execution time for each test

提交回复
热议问题