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

kamal picture kamal · Mar 30, 2011 · Viewed 8.3k times · Source

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

Answer

Noah picture Noah · Mar 30, 2011

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.