diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index cf40412f85266d..d591b892306196 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -3210,5 +3210,67 @@ def test_inheritance(self, alpharep): assert isinstance(file, cls) +class StripExtraTests(unittest.TestCase): + # Note: all of the "z" characters are technically invalid, but up + # to 3 bytes at the end of the extra will be passed through as they + # are too short to encode a valid extra. + + ZIP64_EXTRA = 1 + + def test_no_data(self): + s = struct.Struct("