summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-05-19 19:03:22 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-05-19 19:03:22 (GMT)
commit975077a88912d723c7c3277f5abc8b7497f63e2a (patch)
treeebef00678b6062c140aded82e8539ec0656aa10c /Lib/test/test_zipimport.py
parentcad648cbc95db0a5d694bd73a6a4ba2505920066 (diff)
downloadcpython-975077a88912d723c7c3277f5abc8b7497f63e2a.zip
cpython-975077a88912d723c7c3277f5abc8b7497f63e2a.tar.gz
cpython-975077a88912d723c7c3277f5abc8b7497f63e2a.tar.bz2
Refactor a few tests to use the new requires_zlib decorator.
Diffstat (limited to 'Lib/test/test_zipimport.py')
-rw-r--r--Lib/test/test_zipimport.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 090f0f3..5aab6b4 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -9,12 +9,6 @@ import unittest
from test import support
from test.test_importhooks import ImportHooksBaseTestCase, test_src, test_co
-# some tests can be ran even without zlib
-try:
- import zlib
-except ImportError:
- zlib = None
-
from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED
import zipimport
@@ -397,7 +391,7 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
os.remove(filename)
-@unittest.skipUnless(zlib, "requires zlib")
+@support.requires_zlib
class CompressedZipImportTestCase(UncompressedZipImportTestCase):
compression = ZIP_DEFLATED