From 3235369f5c4f9bce2b5e1d07db56c82971965581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Tue, 6 Jun 2006 13:49:50 +0000 Subject: [PATCH] * not needed here --- tests/zipfileexttests.py | 54 ---------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 tests/zipfileexttests.py diff --git a/tests/zipfileexttests.py b/tests/zipfileexttests.py deleted file mode 100644 index 6786d21a..00000000 --- a/tests/zipfileexttests.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2005, TUBITAK/UEKAE -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) -# any later version. -# -# Please read the COPYING file. -# -# Author: Eray Ozkural - -import unittest -import os -import random -import array - -from pisi.zipfileext import * - -import testcase - -def listtostr(list): - return array.array('B', list).tostring() - -class ZipFileExtCase(testcase.TestCase): - - def setUp(self): - testcase.TestCase.setUp(self, database = False) - - def makeRandomFile(self, fn): - random.seed() - str = listtostr( [ random.randint(0, 255) for x in range(18888) ] ) - f = file(fn, 'w') - f.write(str) - return str - - def genericTestZipUnzip(self, compress_type): - str = self.makeRandomFile('tmp/random') - zipfile = ZipFileExt('tmp/test.zip', 'w') - zipfile.write('tmp/random', compress_type = compress_type) - zipfile.close() - zipfile2 = ZipFileExt('tmp/test.zip', 'r') - str2 = zipfile2.read('tmp/random') - self.assertEqual(str, str2) - - def testStoredZipUnzip(self): - self.genericTestZipUnzip(ZIP_STORED) - - def testDeflateZipUnzip(self): - self.genericTestZipUnzip(ZIP_DEFLATED) - - def testLzmaZipUnzip(self): - self.genericTestZipUnzip(ZIP_LZMA_BOGUS) - -suite = unittest.makeSuite(ZipFileExtCase)