Staging
v0.5.1
https://github.com/python/cpython
Revision f668d2b775da4bcd07e142c4bc5ebd88165fadf4 authored by Miss Islington (bot) on 17 September 2019, 11:35:56 UTC, committed by GitHub on 17 September 2019, 11:35:56 UTC

In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
(cherry picked from commit 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa)

Co-authored-by: Abraham Toriz Cruz <awonderfulcode@gmail.com>
1 parent 728bea6
Raw File
Tip revision: f668d2b775da4bcd07e142c4bc5ebd88165fadf4 authored by Miss Islington (bot) on 17 September 2019, 11:35:56 UTC
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
Tip revision: f668d2b
CODE_OF_CONDUCT.md
# Code of Conduct

Please note that all interactions on
[Python Software Foundation](https://www.python.org/psf-landing/)-supported
infrastructure is [covered](https://www.python.org/psf/records/board/minutes/2014-01-06/#management-of-the-psfs-web-properties)
by the [PSF Code of Conduct](https://www.python.org/psf/codeofconduct/),
which includes all the infrastructure used in the development of Python itself
(e.g. mailing lists, issue trackers, GitHub, etc.).

In general, this means that everyone is expected to be **open**, **considerate**, and
**respectful** of others no matter what their position is within the project.

back to top