From 2b3d330a120a16e97cecd5163b5d454dcfe38a2b Mon Sep 17 00:00:00 2001 From: Daniele Tricoli Date: Fri, 9 Oct 2015 23:07:31 +0200 Subject: Import python-urllib3_1.12.orig.tar.gz --- test/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/__init__.py') diff --git a/test/__init__.py b/test/__init__.py index 172493c..f7c4a7a 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""" -- cgit v1.2.3 From 3a7deaa269ec9e1dc5dfb860e29b053475647cf5 Mon Sep 17 00:00:00 2001 From: Daniele Tricoli Date: Thu, 8 Oct 2015 13:19:46 -0700 Subject: Do not use embedded copy of python-six. Forwarded: not-needed Last-Update: 2015-05-03 Patch-Name: 01_do-not-use-embedded-python-six.patch --- test/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/__init__.py') diff --git a/test/__init__.py b/test/__init__.py index f7c4a7a..22d3616 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -8,7 +8,7 @@ import socket from nose.plugins.skip import SkipTest from urllib3.exceptions import MaxRetryError, HTTPWarning -from urllib3.packages import six +import six # We need a host that will not immediately close the connection with a TCP # Reset. SO suggests this hostname -- cgit v1.2.3