* fix: test lzma, and, well, use ZipFileExt

This commit is contained in:
Eray Özkural
2006-05-08 08:26:25 +00:00
parent 0f5a81cb5f
commit 6513867c28
+4 -2
View File
@@ -35,10 +35,10 @@ class ZipFileExtCase(testcase.TestCase):
def genericTestZipUnzip(self, compress_type): def genericTestZipUnzip(self, compress_type):
str = self.makeRandomFile('tmp/random') str = self.makeRandomFile('tmp/random')
zipfile = ZipFile('tmp/test.zip', 'w') zipfile = ZipFileExt('tmp/test.zip', 'w')
zipfile.write('tmp/random', compress_type = compress_type) zipfile.write('tmp/random', compress_type = compress_type)
zipfile.close() zipfile.close()
zipfile2 = ZipFile('tmp/test.zip', 'r') zipfile2 = ZipFileExt('tmp/test.zip', 'r')
str2 = zipfile2.read('tmp/random') str2 = zipfile2.read('tmp/random')
self.assertEqual(str, str2) self.assertEqual(str, str2)
@@ -48,5 +48,7 @@ class ZipFileExtCase(testcase.TestCase):
def testDeflateZipUnzip(self): def testDeflateZipUnzip(self):
self.genericTestZipUnzip(ZIP_DEFLATED) self.genericTestZipUnzip(ZIP_DEFLATED)
def testLzmaZipUnzip(self):
self.genericTestZipUnzip(ZIP_LZMA)
suite = unittest.makeSuite(ZipFileExtCase) suite = unittest.makeSuite(ZipFileExtCase)