Kumar McMillan <kumar.mcmil...@gmail.com> added the comment: For the record, I too have been plagued by failing setUp's :( and the pattern you describe is not uncommon. I was just pointing out that changing the semantics of tearDown() will affect a lot of existing code. As with any backwards incompatible change the effort of porting to the new functionality should be considered. In this case my fear is that it will be hard to know that tearDown() is not behaving how it used to behave since an exception in tearDown() would be once removed from the actual exception in setUp().
More directly addressing your problem, have you considered switching to context managers? Could maybe do something like: with ConfiguredIOS(): test_something() the context manager could define __exit__() which would get called unconditionally. Also, these could be chained together as decorators to sort-of do what it seems like you were trying to do in tearDown(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5538> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com