[issue5538] tearDown in unittest should be executed regardless of result in setUp

Garrett Cooper report at bugs.python.org
Mon Mar 23 22:35:30 CET 2009


Garrett Cooper <yanegomi at gmail.com> added the comment:

Excellent point Kumar.

Here's what I'm trying to accomplish...

I'm a part of a team that's testing out IOSd on an up and coming Unix
foundation platform. This requires starting up a series of services,
ensuring that they have come up, and then login to the IOS console, then
IF the user gets their configuration correct (because I'm providing a
means for the user to configure IOS) the setup stage of the testcase
will be complete. IF NOT (and here comes the tricky part), the UUT is in
a really questionable / funky state and I can't be sure if the system is
really usable for additional tests without restarting / reinitializing it.

This in and of itself is more problematic to deal with as that means I'd
need to attach myself to the local console and listen for restart to
complete, then issue configuration parameters to boot up the device,
etc... This is being done once by another Tcl script, so I'm trying to
avoid having to reinvent the wheel for known working methods.

Hopefully that better illustrates the quandary that I'm dealing with :).

----------

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


More information about the Python-bugs-list mailing list