tearDown something in your tearDown means that you need to be careful that all cleanup is done before the actual statement, otherwise the cleanup code cannot be called if the assert statement fails and raises.
If the statement is only one line, it might be OK to have it in each test method, if it is more than the one that has a particular method, it would be possible - this method should not be a test of its own, that is, not recognized as a test your test environment. Using a method decorator or class decorator can also be an alternative.
The whole idea is that tearDown should not run any tests, and explicit is better than implicit.
source share