[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined
Serhiy Storchaka
report at bugs.python.org
Fri Aug 27 16:28:09 EDT 2021
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
There are several other bugs in the code for cleaning up classes and modules:
* Functions registered with addClassCleanup() are not called if tearDownClass is set to None or its look up raises AttributeError.
* Buffering in TestResult blows up when functions registered with addClassCleanup() and addModuleCleanup() produce raise exceptions.
* Buffering in TestResult does not buffer output of functions registered with addClassCleanup() and addModuleCleanup().
* TestSuite.debug() blows up if functions registered with addClassCleanup() and addModuleCleanup() raise exceptions.
* Errors in setUpModule() and function registered with addModuleCleanup() are reported in wrong order.
And several lesser bugs.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43913>
_______________________________________
More information about the Python-bugs-list
mailing list