[issue25985] Use sys.version_info instead of sys.version
Andrew Plummer added the comment: On a related note, I think that https://hg.python.org/cpython/file/tip/Makefile.pre.in#l571 should get the same treatment. -- nosy: +aplummer ___ Python tracker <http://bugs.python.org/issue25985> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25195] mock.ANY doesn't match mock.MagicMock() object
Changes by Andrew Plummer : Removed file: http://bugs.python.org/file41847/test_assert_called_with_any.diff ___ Python tracker <http://bugs.python.org/issue25195> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25195] mock.ANY doesn't match mock.MagicMock() object
Changes by Andrew Plummer : Added file: http://bugs.python.org/file41848/fix_mock_call_ne.patch ___ Python tracker <http://bugs.python.org/issue25195> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25195] mock.ANY doesn't match mock.MagicMock() object
Changes by Andrew Plummer : Removed file: http://bugs.python.org/file41844/fix_mock_call_ne.patch ___ Python tracker <http://bugs.python.org/issue25195> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25195] mock.ANY doesn't match mock.MagicMock() object
Andrew Plummer added the comment: Have added a new diff to just use the default __ne__ implementation rather than tuple's. Have also added a test that targets exactly the reported issue. -- Added file: http://bugs.python.org/file41847/test_assert_called_with_any.diff ___ Python tracker <http://bugs.python.org/issue25195> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25195] mock.ANY doesn't match mock.MagicMock() object
Andrew Plummer added the comment: 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. -- keywords: +patch nosy: +Andrew Plummer Added file: http://bugs.python.org/file41844/fix_mock_call_ne.patch ___ Python tracker <http://bugs.python.org/issue25195> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com