Martin [gz] wrote: > Actually, it's not quite that easy as there's now a straight > _TypeEqualityDict<->TestCase reference link. I'll see if I can get > upstream to accept some kind of fix.
In the interim we could add some ugly code to handle both versions: tef_clear = getattr(type_equality_funcs, "clear", None): if tef_clear is None: tef_instance_dict = getattr(type_equality_funcs, "__dict__", None) if tef_instance_dict is not None: tef_clear = tef_instance_dict.clear if tef_clear is not None: tef_clear() Or perhaps we should just set the entire attribute to None, if it exists, and rely on the assumption that by the time we do this self.assertEqual isn't going to be invoked again: sentinel = object() if getattr(self, '_type_equality_funcs', sentinel) is not sentinel: self._type_equality_funcs = None -Andrew. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/809048 Title: bzr crashed with AttributeError in stopTest(): '_TypeEqualityDict' object has no attribute 'clear' To manage notifications about this bug go to: https://bugs.launchpad.net/bzr/+bug/809048/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs