From 2cbbedf7be98fd3f43ab8897f68e36c18e2bef9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:35:47 -0400 Subject: Added python 2.4-2.6 support for skipIf --HG-- branch : distribute extra : rebase_source : cac18ef7c3dbde38ceac3a0c71cfb3b5ffa56dd5 --- setuptools/tests/py26compat.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 setuptools/tests/py26compat.py (limited to 'setuptools/tests/py26compat.py') 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 -- cgit v1.2.3 From 22366805a3a7b6292774491db04792851a341b6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:51:14 -0400 Subject: Fix compatibility skipIf --HG-- branch : distribute extra : rebase_source : a70fd5755fad7a30c478c44e270c1dad13e66a47 --- setuptools/tests/py26compat.py | 1 + 1 file changed, 1 insertion(+) (limited to 'setuptools/tests/py26compat.py') diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index ddf2ceb0..d4fb891a 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -11,3 +11,4 @@ except AttributeError: if condition: return skip return func + return skipper -- cgit v1.2.3