dimanche 9 octobre 2016

Testing execution time

For some code, it's important to verify not only the return value and side effects, but also the execution time.

For example, it might be critical that the code correctly implemented an algorithm with the lower time complexity, or properly used caching or buffering, etc.

Is there any way to check runtime with py.test or other testing frameworks?

Obviously, I can manually write the tests for each case. But that means a lot of boilerplate code.

Aucun commentaire:

Enregistrer un commentaire