summaryrefslogtreecommitdiff
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-01-12 06:18:32 -0800
committerSenthil Kumaran <senthil@uthcode.com>2016-01-12 06:18:32 -0800
commit121edbf7e26ad0ac887ac4a2bf46316deb05737e (patch)
tree43e6f1011c203ac4bfdef28b13464ee7d26d30c7 /Lib/unittest/mock.py
parent2b06558769e23bd91d7dbb88dbfb6b5ed6e0054a (diff)
downloadcpython-git-121edbf7e26ad0ac887ac4a2bf46316deb05737e.tar.gz
Issue25347 - Format the error message output of mock's assert_has_calls method.
Patch contributed by Robert Zimmerman.
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r--Lib/unittest/mock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 976f663c0a..21f49fab1b 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -820,7 +820,7 @@ class NonCallableMock(Base):
if expected not in all_calls:
raise AssertionError(
'Calls not found.\nExpected: %r\n'
- 'Actual: %r' % (calls, self.mock_calls)
+ 'Actual: %r' % (_CallList(calls), self.mock_calls)
) from cause
return