New submission from Aaron Altman <aa...@tomorrowsfunction.com>: Not sure if this is intended behavior. I have a baseClass I'm writing tests for. My test architecture has an instance of this baseClass assigned as a member of TestBaseClass(unittest.TestCase) in TestBaseClass.setUp.
The problem occurs when tests in TestBaseClass modify state within the member baseClass instance. I think there should be a fresh new instance of baseClass for every test that gets run, but the old state from the last test is still there. Example code and output from Python 2.6.2 attached. ---------- components: Library (Lib), Tests files: unittest_doesnt_reinstantiate_members.txt messages: 96189 nosy: awaltman severity: normal status: open title: Call to another class's constructor in unittest.TestCase.setUp returns the same instance versions: Python 2.6 Added file: http://bugs.python.org/file15514/unittest_doesnt_reinstantiate_members.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7465> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com