testtools details should not be shared between parameterised tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Andrew Bennetts |
Bug Description
Since selftest started depending on testtools, parameterised tests have been sharing their 'details', the new testtools api for things like the log, traceback, skip reason, and so on. This is mostly unnoticed as each test will overwrite the previous attributes, but when Robert added multiple traceback recording, some tests now grow a new traceback each time a test fails. Other symptoms are also possible, like passing tests inheriting spurious details from earlier skipped or failing tests.
Robert suggested that the (shallow) copy.copy in bzrlib.
This problem is incidentally, and accidentally, worked around in the lp:~gz/bzr/cleanup_testcases_by_collection_613247 branch as I needed to clear the details to break a cycle.
Related branches
- Martin Pool: Approve
-
Diff: 81 lines (+16/-32)2 files modifiedNEWS (+4/-4)
bzrlib/tests/__init__.py (+12/-28)
Addressed by lp:~spiv/bzr/traceback-accumulation-2.2 for bzrlib, and bug 637725 filed against testtools.