Commits

Jason R. Coombs committed 6e9eb07

Added python 2.4-2.6 support for skipIf

  • Participants
  • Parent commits 31fd0e5

Comments (0)

Files changed (2)

File setuptools/tests/py26compat.py

+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

File setuptools/tests/test_dist_info.py

 
 import pkg_resources
 
+from setuptools.tests.py26compat import skipIf
+
 def DALS(s):
     "dedent and left-strip"
     return textwrap.dedent(s).lstrip()