summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests
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/packaging/tests
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/packaging/tests')
-rw-r--r--Lib/packaging/tests/test_command_bdist_dumb.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/packaging/tests/test_command_bdist_dumb.py b/Lib/packaging/tests/test_command_bdist_dumb.py
index ce1563f..41b0dd0 100644
--- a/Lib/packaging/tests/test_command_bdist_dumb.py
+++ b/Lib/packaging/tests/test_command_bdist_dumb.py
@@ -3,16 +3,10 @@
import sys
import os
-# zlib is not used here, but if it's not available
-# test_simple_built will fail
-try:
- import zlib
-except ImportError:
- zlib = None
-
from packaging.dist import Distribution
from packaging.command.bdist_dumb import bdist_dumb
from packaging.tests import unittest, support
+from packaging.tests.support import requires_zlib
SETUP_PY = """\
@@ -39,7 +33,7 @@ class BuildDumbTestCase(support.TempdirManager,
sys.argv[:] = self.old_sys_argv[1]
super(BuildDumbTestCase, self).tearDown()
- @unittest.skipUnless(zlib, "requires zlib")
+ @requires_zlib
def test_simple_built(self):
# let's create a simple package