mirror of https://github.com/python/cpython
Fixed tests for issue #19279.
This commit is contained in:
parent
b649ed746e
commit
0e071c967c
|
@ -840,10 +840,9 @@ class UTF7Test(ReadTest, unittest.TestCase):
|
|||
(b'a+////,+IKw-b', 'a\uffff\ufffd\u20acb'),
|
||||
]
|
||||
for raw, expected in tests:
|
||||
with self.subTest(raw=raw):
|
||||
self.assertRaises(UnicodeDecodeError, codecs.utf_7_decode,
|
||||
raw, 'strict', True)
|
||||
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
|
||||
self.assertRaises(UnicodeDecodeError, codecs.utf_7_decode,
|
||||
raw, 'strict', True)
|
||||
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
|
||||
|
||||
def test_nonbmp(self):
|
||||
self.assertEqual('\U000104A0'.encode(self.encoding), b'+2AHcoA-')
|
||||
|
|
Loading…
Reference in New Issue