[MERGE] add _TestCase__testMethodDoc to attrs_to_keep, do attr saving more sanely
michael.hudson at canonical.com
Thu Apr 30 05:12:52 BST 2009
I was surprised to find that running a bzrlib TestCase outside bzrlib's
test runner was exploding like this:
AttributeError: 'SvnBzrTotlaModuleTestCase' object has no attribute
It turns out that bzrlib clears all attributes from a testcase that it
doesn't know about, and it doesn't know about _TestCase__testMethodDoc,
which is used by Python 2.4's unittest module (but not later versions).
I also changed the way the attributes were cleared to avoid sticking a
bound method for 'id' into the instance dictionary, which added to my
confusion when figuring this out.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3413 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090430/e3fba3a3/attachment.bin
More information about the bazaar