[issue35226] mock.call equality surprisingly broken

Chris Withers report at bugs.python.org
Tue Nov 13 05:01:48 EST 2018


Chris Withers <chris at simplistix.co.uk> added the comment:

I don't think the getattr(self, 'parent', None) is necessary, the attribute is always there and None == None ;-)

I reckon this will work:

if self.parent != other.parent):
    return True

...but obviously, we'd add some more tests to the suite to make sure this keeps working.

If this is the way to go, lemme know and I'll work up a PR.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35226>
_______________________________________


More information about the Python-bugs-list mailing list