summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2009-09-12 18:41:20 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2009-09-12 18:41:20 (GMT)
commit78ea2023d8aaac460ef921c45a20053159dec613 (patch)
treee60fbfd5532a3e8a5430b68f76de05e0724188a5 /Lib/test/test_zipfile.py
parent049d2aa952ae8deb8932a2b84aa1d503b83ad6a5 (diff)
downloadcpython-78ea2023d8aaac460ef921c45a20053159dec613.zip
cpython-78ea2023d8aaac460ef921c45a20053159dec613.tar.gz
cpython-78ea2023d8aaac460ef921c45a20053159dec613.tar.bz2
Merged revisions 74754 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74754 | ezio.melotti | 2009-09-12 17:43:43 +0300 (Sat, 12 Sep 2009) | 1 line #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 b17f857..76be41c 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -307,6 +307,7 @@ class TestsWithSourceFile(unittest.TestCase):
self.assertEqual(zipfp.read(TESTFN), open(TESTFN, "rb").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")
@@ -881,6 +882,7 @@ class DecryptionTests(unittest.TestCase):
self.zip2.setpassword(b"perl")
self.assertRaises(RuntimeError, self.zip2.read, "zero")
+ @skipUnless(zlib, "requires zlib")
def test_good_password(self):
self.zip.setpassword(b"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