def testCompressChunks10(self):
    bz2c = BZ2Compressor()
    n = 0
    data = b''
    while True:
        str = self.TEXT[(n * 10):((n + 1) * 10)]
        if (not str):
            break
        data += bz2c.compress(str)
        n += 1
    data += bz2c.flush()
    self.assertEqual(ext_decompress(data), self.TEXT)
def testCompressChunks10(self):
    bz2c = BZ2Compressor()
    n = 0
    data = b
    while True:
        str = self.TEXT[(n * 10):((n + 1) * 10)]
        if (not str):
            break
        data += bz2c.compress(str)
        n += 1
    data += bz2c.flush()
    self.assertEqual(ext_decompress(data), self.TEXT)