bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310)

(cherry picked from commit 9d607061c9)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-09-09 04:42:43 -07:00 committed by GitHub
parent 252267925d
commit bee8bfe5f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -2320,7 +2320,7 @@ def _format_call_signature(name, args, kwargs):
formatted_args = ''
args_string = ', '.join([repr(arg) for arg in args])
kwargs_string = ', '.join([
'%s=%r' % (key, value) for key, value in sorted(kwargs.items())
'%s=%r' % (key, value) for key, value in kwargs.items()
])
if args_string:
formatted_args = args_string