def testWriteChunks10(self):
    with BZ2File(self.filename, 'w') as bz2f:
        n = 0
        while True:
            str = self.TEXT[(n * 10):((n + 1) * 10)]
            if (not str):
                break
            bz2f.write(str)
            n += 1
    with open(self.filename, 'rb') as f:
        self.assertEqual(ext_decompress(f.read()), self.TEXT)
def testWriteChunks10(self):
    with BZ2File(self.filename, 'w') as bz2f:
        n = 0
        while True:
            str = self.TEXT[(n * 10):((n + 1) * 10)]
            if (not str):
                break
            bz2f.write(str)
            n += 1
    with open(self.filename, 'rb') as f:
        self.assertEqual(ext_decompress(f.read()), self.TEXT)