mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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 ........
This commit is contained in:
parent
049d2aa952
commit
78ea2023d8
7 changed files with 51 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue