[issue1550273] Fix numerous bugs in unittest

Ionut Turturica report at bugs.python.org
Tue Aug 18 03:10:14 CEST 2009


Ionut Turturica <jonozzz at yahoo.com> added the comment:

I am a little bit concerned with the new __eq__:

    def __eq__(self, other):
        if type(self) is not type(other):
            return False
        return self._tests == other._tests

Why did you use "self._tests == other._tests" instead of "self is other" ?

After I upgraded to 2.6 I started to have some issues with a breadth
first iterator for a TestSuite and I tracked them down to this eq method.

----------
nosy: +jonozzz

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1550273>
_______________________________________


More information about the Python-bugs-list mailing list