Skip to content

Commit 4382c89

Browse files
committed
gh-153679: Trim the test comment and NEWS wording
1 parent 62efd2c commit 4382c89

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

Lib/test/test_zipimport.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,9 +1075,7 @@ def testNotZipFile(self):
10751075
self.assertZipFailure(TESTMOD)
10761076

10771077
def testInvalidUTF8FileName(self):
1078-
# A central directory entry that sets the UTF-8 file name flag (0x800)
1079-
# but stores bytes that are not valid UTF-8 must raise ZipImportError
1080-
# rather than leaking a UnicodeDecodeError.
1078+
# A UTF-8-flagged file name that is not valid UTF-8 raises ZipImportError.
10811079
UTF8_FLAG = 0x800
10821080
name = b'\xff\xfe\xff'
10831081
cdh = b'PK\x01\x02' + struct.pack(
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
:class:`zipimport.zipimporter` now raises :exc:`zipimport.ZipImportError`
2-
instead of :exc:`UnicodeDecodeError` when a central directory entry sets the
3-
UTF-8 file name flag but stores a file name that is not valid UTF-8.
4-
Patch by tonghuaroot.
2+
instead of :exc:`UnicodeDecodeError` for a UTF-8-flagged file name that is not
3+
valid UTF-8. Patch by tonghuaroot.

0 commit comments

Comments
 (0)