summaryrefslogtreecommitdiff
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2009-09-12 14:43:43 +0000
committerEzio Melotti <ezio.melotti@gmail.com>2009-09-12 14:43:43 +0000
commit1036a7f7e180ac3fd98e43832a04e38b4c7c9e83 (patch)
treeeab29c294a6bbc075d44281c91d7ae433f3c96d0 /Lib/test/test_zipfile.py
parent21121e64b4245e51b85b9d2bc9b29acb86ae79eb (diff)
downloadcpython-git-1036a7f7e180ac3fd98e43832a04e38b4c7c9e83.tar.gz
#6026 - fix tests that failed without zlib
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r--Lib/test/test_zipfile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 652274f8fe..3f86b32adb 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -311,6 +311,7 @@ class TestsWithSourceFile(unittest.TestCase):
self.assertEqual(zipfp.read(TESTFN), file(TESTFN).read())
zipfp.close()
+ @skipUnless(zlib, "requires zlib")
def test_per_file_compression(self):
# Check that files within a Zip archive can have different compression options
zipfp = zipfile.ZipFile(TESTFN2, "w")
@@ -882,6 +883,7 @@ class DecryptionTests(unittest.TestCase):
self.zip2.setpassword("perl")
self.assertRaises(RuntimeError, self.zip2.read, "zero")
+ @skipUnless(zlib, "requires zlib")
def test_good_password(self):
self.zip.setpassword("python")
self.assertEquals(self.zip.read("test.txt"), self.plain)
@@ -982,6 +984,7 @@ class TestsWithRandomBinaryFiles(unittest.TestCase):
self.zip_random_open_test(f, zipfile.ZIP_STORED)
+@skipUnless(zlib, "requires zlib")
class TestsWithMultipleOpens(unittest.TestCase):
def setUp(self):
# Create the ZIP archive