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 carljm
Recipients carljm, michael.foord, pitrou
Date 2016-08-09.03:13:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470712387.71.0.6487497692.issue27715@psf.upfronthosting.co.za>
In-reply-to
Content
`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)

```
History
Date User Action Args
2016-08-09 03:13:07carljmsetrecipients: + carljm, pitrou, michael.foord
2016-08-09 03:13:07carljmsetmessageid: <1470712387.71.0.6487497692.issue27715@psf.upfronthosting.co.za>
2016-08-09 03:13:07carljmlinkissue27715 messages
2016-08-09 03:13:07carljmcreate