@@ -164,23 +164,8 @@ def test_decompress_igzip(data_size, level):
164
164
165
165
166
166
@pytest .mark .parametrize (["unused_size" , "wbits" ],
167
- itertools .product ([26 ], [31 ]))
168
- def test_unused_data_gzip (unused_size , wbits ):
169
- unused_data = b"abcdefghijklmnopqrstuvwxyz" [:unused_size ]
170
- compressor = zlib .compressobj (wbits = wbits )
171
- data = b"A meaningful sentence stardts with a capital and ends with a."
172
- compressed = compressor .compress (data ) + compressor .flush ()
173
- decompressor = isal_zlib .decompressobj (wbits = wbits )
174
- result = decompressor .decompress (compressed + unused_data )
175
- assert result == data
176
- assert decompressor .unused_data == unused_data
177
-
178
-
179
- @pytest .mark .xfail (reason = "Unused data and unconsumed tail do not work "
180
- "properly for non-gzip compression." )
181
- @pytest .mark .parametrize (["unused_size" , "wbits" ],
182
- itertools .product ([26 ], [- 15 , 15 ]))
183
- def test_unused_data_zlib_raw (unused_size , wbits ):
167
+ itertools .product ([26 ], [- 15 , 15 , 31 ]))
168
+ def test_unused_data (unused_size , wbits ):
184
169
unused_data = b"abcdefghijklmnopqrstuvwxyz" [:unused_size ]
185
170
compressor = zlib .compressobj (wbits = wbits )
186
171
data = b"A meaningful sentence starts with a capital and ends with a."
0 commit comments