summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/py26compat.py13
-rw-r--r--setuptools/tests/test_dist_info.py2
2 files changed, 15 insertions, 0 deletions
diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
new file mode 100644
index 00000000..ddf2ceb0
--- /dev/null
+++ b/setuptools/tests/py26compat.py
@@ -0,0 +1,13 @@
+import unittest
+
+try:
+ # provide skipIf for Python 2.4-2.6
+ skipIf = unittest.skipIf
+except AttributeError:
+ def skipIf(condition, reason):
+ def skipper(func):
+ def skip(*args, **kwargs):
+ return
+ if condition:
+ return skip
+ return func
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index 318cd973..cf8fb0f9 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -13,6 +13,8 @@ except:
import pkg_resources
+from setuptools.tests.py26compat import skipIf
+
def DALS(s):
"dedent and left-strip"
return textwrap.dedent(s).lstrip()