How do I measure the execution time of python unit tests with nosetests?

后端 未结 2 1699
孤街浪徒
孤街浪徒 2021-02-03 22:18

Is there a way to time the execution time of individual Python tests which are run by nosetests ?

2条回答
  •  我在风中等你
    2021-02-03 23:07

    You might try the nose plug-in posted here: https://github.com/mahmoudimus/nose-timer (or available via pip / PyPi). You can also use the built-in plugin --with-profile to do more serious profiling.

提交回复
热议问题