This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aplummer
Recipients aplummer, felixonmars, michael.foord
Date 2016-02-08.00:02:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454889778.05.0.179778548425.issue25195@psf.upfronthosting.co.za>
In-reply-to
Content
I've had a look and I think this could be because the class _Call (also in unittest.mock) has lost its __ne__ method between 3.4 and 3.5.

Compare
https://hg.python.org/cpython/file/v3.4.4/Lib/unittest/mock.py#l2010
with
https://hg.python.org/cpython/file/v3.5.1/Lib/unittest/mock.py#l2028

This leads me to this changeset:
https://hg.python.org/cpython/rev/3603bae63c13


My failing test:

from unittest import mock

call1 = mock.call(mock.MagicMock())
call2 = mock.call(mock.ANY)

assert call1 == call2
assert not (call1 != call2)

This passes in 3.4 but fails in 3.5, but fails on the second assert, not the first. So they are equal, but they're not not-equal. I've added this as a test and reinstated __ne__ in my patch.
History
Date User Action Args
2016-02-08 00:02:58aplummersetrecipients: + aplummer, michael.foord, felixonmars
2016-02-08 00:02:58aplummersetmessageid: <1454889778.05.0.179778548425.issue25195@psf.upfronthosting.co.za>
2016-02-08 00:02:58aplummerlinkissue25195 messages
2016-02-08 00:02:57aplummercreate