gh-115692: Add tests to increase json coverage (#115693)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
Hugo van Kemenade 2024-04-14 15:11:06 +03:00 committed by GitHub
parent 9c93b7402b
commit 8fc953f606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 10 deletions

View file

@ -23,8 +23,7 @@ class TestEncodeBasestringAscii:
for input_string, expect in CASES:
result = self.json.encoder.encode_basestring_ascii(input_string)
self.assertEqual(result, expect,
'{0!r} != {1!r} for {2}({3!r})'.format(
result, expect, fname, input_string))
f'{result!r} != {expect!r} for {fname}({input_string!r})')
def test_ordered_dict(self):
# See issue 6105