Carl Meyer added the comment: `hg clean --all` resolved the compilation issues; confirmed that https://hg.python.org/cpython/rev/b888c9043566/ is at fault.
Also, the exception trace I provided above looks wrong; it must be from when I was messing about with `autospec=True` or passing in the instance. The actual trace from the sample code in the original report has no mention of the instance: ``` TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "../mock-method.example.py", line 11, in <module> mock_bar.assert_called_once_with(7) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 822, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 811, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: bar(7) Actual call: bar(7) ``` ---------- _______________________________________ 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