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
History
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
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.7 KB
.travis.yml -rw-r--r-- 8.1 KB
CODE_OF_CONDUCT.md -rw-r--r-- 630 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 65.6 KB
README.rst -rw-r--r-- 9.8 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 491.6 KB
configure.ac -rw-r--r-- 162.2 KB
install-sh -rwxr-xr-x 15.0 KB
pyconfig.h.in -rw-r--r-- 44.1 KB
setup.py -rw-r--r-- 101.1 KB

README.rst

back to top