def testBadFilter(self):
def eachchunk(chunk):
if chunk[0] != 'IDAT':
return chunk
data = zlib.decompress(chunk[1])
# Corrupt the first filter byte
data = strtobytes('\x99') + data[1:]
data = zlib.compress(data)
return (chunk[0], data)
self.assertRaises(FormatError, self.helperFormat, eachchunk)
评论列表
文章目录