This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngie
Recipients ngie
Date 2009-03-22.21:16:18
SpamBayes Score 2.6288092e-08
Marked as misclassified No
Message-id <>
While trying to deal with some annoying issues with setting up and
tearing down consoles via pexpect, I noticed that the teardown functions
/ methods weren't being executed via nose.

After applying this change to 2.4.5 and 2.6.1, things work as expected
(note: this patch only applies cleanly with 2.4.5 AFAICT -- it didn't
work with 2.6.1).

My expectations are:


I'd expect that the best fix would be for tearDown to be unconditionally
called if setUp is called, s.t. testers can ensure that the operating
state of the UUT and testbed are at a predefined state.

So in my testcase provided, I would expect the following flow:

1. Keeping assert False in setup_module...
`Calling setup_module'
<assert fails>
`Calling teardown_module'

2. Removing assert False from setup_module...

`Calling setup_module'
- `Calling function_setup'
<assert fails>
- `Calling function_teardown'
- `Calling TestClass:setUp'
<assert fails>
- `Calling TestClass:tearDown'
`Calling teardown_module'

If this isn't done, it makes some operations, like tearing down consoles
with pexpect _extremely_ painful to perform...


Please see <>
for more details.
Date User Action Args
2009-03-22 21:16:24ngiesetrecipients: + ngie
2009-03-22 21:16:23ngiesetmessageid: <>
2009-03-22 21:16:21ngielinkissue5538 messages
2009-03-22 21:16:19ngiecreate