David Hoyes added the comment: I came across a different failing test case, which looks a lot like the same issue:
``` from unittest import mock class Foo(object): def __call__(self, x): return x m = mock.create_autospec(Foo, instance=True) m(7) m.assert_called_once_with(7) ``` In mock 1.0.1 this passes, but in Python 3.5 we get this error: ``` TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "euhpc/tmp/mockbug.py", line 12, in <module> m.assert_called_once_with(7) File "/usr/lib/python3.5/unittest/mock.py", line 803, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/usr/lib/python3.5/unittest/mock.py", line 792, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(7) Actual call: mock(7) ``` ---------- nosy: +David Hoyes _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27715> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com