Comment 5 for bug 881497

Revision history for this message
Robert Collins (lifeless) wrote :

before run_test_method:
self.case.__dict__.keys()
['exception_handlers', '_testMethodName', '_TestCase__details', '_resultForDoCleanups', '_unique_id_gen', '_traceback_id_gens', '_cleanups', '_type_equality_funcs', 'cmd', '_TestCase__exception_handlers', '_TestCase__setup_called', '_testMethodDoc', '_TestCase__teardown_called', '_TestCase__RunTest']

after:
(Pdb) self.case.__dict__.keys()
['exception_handlers', '_testMethodName', '_TestCase__details', '_resultForDoCleanups', '_unique_id_gen', '_traceback_id_gens', '_cleanups', '_type_equality_funcs', 'cmd', '_TestCase__exception_handlers', '_TestCase__setup_called', '_testMethodDoc', '_TestCase__teardown_called', '_TestCase__RunTest']

after tearDown:

(Pdb) self.case.__dict__.keys()
['exception_handlers', '_testMethodName', '_TestCase__details', '_resultForDoCleanups', '_unique_id_gen', '_traceback_id_gens', '_cleanups', '_type_equality_funcs', '_TestCase__exception_handlers', '_TestCase__setup_called', '_testMethodDoc', '_TestCase__teardown_called', '_TestCase__RunTest']

-> cmd is gone. So tearDown *and* cleanUp are both removing the cmd attribute.