Timing Tests in Python For Fun and Profit
Read OriginalThis technical article details a method for hunting down slow tests in Python's unittest framework. It explains how to use setUp and tearDown hooks to time individual tests, set a threshold for 'slow' tests, and then extends the solution by creating a custom TestResult and TestRunner to automatically report only the tests that exceed the timing threshold, providing a more robust and reusable approach.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet