aboutsummaryrefslogtreecommitdiff
path: root/test/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/__init__.py')
-rw-r--r--test/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/__init__.py b/test/__init__.py
index 7ea6358..22d3616 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -56,6 +56,17 @@ def onlyPy27OrNewer(test):
return test(*args, **kwargs)
return wrapper
+def onlyPy279OrNewer(test):
+ """Skips this test unless you are onl Python 2.7.9 or later."""
+
+ @functools.wraps(test)
+ def wrapper(*args, **kwargs):
+ msg = "{name} requires Python 2.7.9+ to run".format(name=test.__name__)
+ if sys.version_info < (2, 7, 9):
+ raise SkipTest(msg)
+ return test(*args, **kwargs)
+ return wrapper
+
def onlyPy3(test):
"""Skips this test unless you are on Python3.x"""