Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00bf268

Browse files
committed
Issue25347 - Format the error message output of mock's assert_has_calls method.
Patch contributed by Robert Zimmerman.
1 parent 6af11e8 commit 00bf268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/unittest/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def assert_has_calls(self, calls, any_order=False):
820820
if expected not in all_calls:
821821
raise AssertionError(
822822
'Calls not found.\nExpected: %r\n'
823-
'Actual: %r' % (calls, self.mock_calls)
823+
'Actual: %r' % (_CallList(calls), self.mock_calls)
824824
) from cause
825825
return
826826

0 commit comments

Comments
 (0)