Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Matt, you can add this to your own unit tests by just subclassing unittest.TestCase and adding a new assertDuration method. Copy the existing method's implementations (its open source and you should have the source code already, but if not you can find it here: https://github.com/python/cpython/blob/3.8/Lib/unittest/__init__.py If you are looking for some timing code to use (in case you don't already have your own) you can try this: https://github.com/ActiveState/code/tree/master/recipes/Python/577896_Benchmark_code ---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41788> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com