diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2012-07-22 15:35:47 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2012-07-22 15:35:47 -0400 |
| commit | 2cbbedf7be98fd3f43ab8897f68e36c18e2bef9a (patch) | |
| tree | 1eb9b10253c7dcf5a10328977bdaabd960ba2cb3 /setuptools | |
| parent | 4f7bf7c846ae9761bd10a44f60c656b9741d69be (diff) | |
| download | python-setuptools-git-2cbbedf7be98fd3f43ab8897f68e36c18e2bef9a.tar.gz | |
Added python 2.4-2.6 support for skipIf
--HG--
branch : distribute
extra : rebase_source : cac18ef7c3dbde38ceac3a0c71cfb3b5ffa56dd5
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/py26compat.py | 13 | ||||
| -rw-r--r-- | setuptools/tests/test_dist_info.py | 2 |
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() |
