Below you will find pages that utilize the tag “Python”
Posts
read more
Conditional Cleanups in Pytest
A helpful pattern in testing is to take some cleanup action only if the test passes/fails. For instance, for a test which interacts with an on-filesystem database, the database should be deleted if the test passes, but it should stick around if the test fails so that the developer can examine it and debug.