From 121edbf7e26ad0ac887ac4a2bf46316deb05737e Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 12 Jan 2016 06:18:32 -0800 Subject: Issue25347 - Format the error message output of mock's assert_has_calls method. Patch contributed by Robert Zimmerman. --- Lib/unittest/mock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1