Measuring execution time for Python unit tests is pretty easy with pytest. Obviously, if you find any slow running tests you'll need to spend time figuring out why they're slow and fixing them if possible. Some of the most common reasons for slow tests are unintended network requests and un-mocked time delays, but there are plenty of other possibilities.

If you've used any other great tools for solving this issue or if you enjoyed this guide, let me know in the comments below!