]> granicus.if.org Git - python/commitdiff
Issue25347 - Format the error message output of mock's assert_has_calls method.
authorSenthil Kumaran <senthil@uthcode.com>
Tue, 12 Jan 2016 14:18:32 +0000 (06:18 -0800)
committerSenthil Kumaran <senthil@uthcode.com>
Tue, 12 Jan 2016 14:18:32 +0000 (06:18 -0800)
Patch contributed by Robert Zimmerman.

Lib/unittest/mock.py

index 976f663c0a958ab301af1bbc38dd8ebcf3f1e97b..21f49fab1b2a7dfe5681961ef9bd98a9bf985971 100644 (file)
@@ -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