[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-03-27 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-03-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- keywords: +3.5regression -patch resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset dcd3b078ab84 by Berker Peksag in branch '3.5': Issue #25195: Fix a regression in mock.MagicMock https://hg.python.org/cpython/rev/dcd3b078ab84 New changeset 880d609b6664 by Berker Peksag in branch 'default': Issue #25195: Fix a regression in mock.Ma

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer
Changes by Andrew Plummer : Removed file: http://bugs.python.org/file41847/test_assert_called_with_any.diff ___ Python tracker ___ ___ Python-

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer
Changes by Andrew Plummer : Added file: http://bugs.python.org/file41848/fix_mock_call_ne.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer
Changes by Andrew Plummer : Removed file: http://bugs.python.org/file41844/fix_mock_call_ne.patch ___ Python tracker ___ ___ Python-bugs-list

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer
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 _

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to use just default implementation: __ne__ = object.__ne__ Interesting that while call1 == call2 is True, call2 == call1 is False. But this is different issue. -- ___ Python tracker

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-07 Thread Berker Peksag
Berker Peksag added the comment: Looks like _Call is a subclass of tuple. Checks in the test could be written as "self.assertIs(a == b, True)". -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.6 ___ Python tracker

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-07 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-07 Thread Andrew Plummer
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

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-06 Thread Ned Deily
Changes by Ned Deily : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2015-09-20 Thread Felix Yan
Changes by Felix Yan : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue25195] mock.ANY doesn't match mock.MagicMock() object

2015-09-20 Thread Felix Yan
New submission from Felix Yan: Since Python 3.5.0 mock.MagicMock() object seems not matched by mock.ANY. This behavior looks weird and breaks tests of boto. Minimized example: In Python 3.4.3: >>> from unittest import mock >>> m = mock.MagicMock() >>> m(mock.MagicMock()) >>> m.assert_called_w