Refactor a few tests to use the new requires_zlib decorator.

This commit is contained in:
Ezio Melotti 2011-05-19 22:03:22 +03:00
parent cad648cbc9
commit 975077a889
5 changed files with 49 additions and 79 deletions

View file

@ -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