[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

Robert Collins report at bugs.python.org
Thu Jul 23 16:56:28 CEST 2015


Robert Collins added the comment:

So yeah - setup  + cleanup is LIFO.
setup + teardown *can* be LIFO [depends on where you upcall]

setup + teardown + cleanup CANNOT be LIFO in all cases: we have to pick one, and either local-first or local-last.

So it is ultimately somewhat arbitrary and transitionary: one shouldn't use tearDown + cleanups, because tearDown is just a poor API by comparison.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24694>
_______________________________________


More information about the Python-bugs-list mailing list