summaryrefslogtreecommitdiff
path: root/dev-python/future/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
commit43793fab84041cfc5c60c0151d1591b8a69fb24a (patch)
tree6208a7f4fc744684fce0f55acbb47511acace498 /dev-python/future/files
parent28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff)
gentoo resync : 25.08.2018
Diffstat (limited to 'dev-python/future/files')
-rw-r--r--dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch50
-rw-r--r--dev-python/future/files/future-0.16.0-fix-tests-py37.patch43
2 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch b/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch
new file mode 100644
index 000000000000..b4ba01ed796a
--- /dev/null
+++ b/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch
@@ -0,0 +1,50 @@
+##Skipping tests due to connection failures on Fedora build-system
+##See https://github.com/PythonCharmers/python-future/issues/165
+
+--- a/tests/test_future/test_standard_library.orig.py 2014-11-21 12:52:03.000000000 +0100
++++ b/tests/test_future/test_standard_library.py 2015-09-02 11:37:36.808826777 +0200
+@@ -318,7 +318,7 @@
+ import builtins
+ self.assertTrue(hasattr(builtins, 'tuple'))
+
+- # @unittest.skip("ssl support has been stripped out for now ...")
++ @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
+ def test_urllib_request_ssl_redirect(self):
+ """
+ This site redirects to https://...
+@@ -332,6 +332,7 @@
+ # pprint(r.read().decode('utf-8'))
+ self.assertTrue(True)
+
++ @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
+ def test_moves_urllib_request_http(self):
+ """
+ This site (python-future.org) uses plain http (as of 2014-09-23).
+@@ -343,6 +343,7 @@
+ data = r.read()
+ self.assertTrue(b'</html>' in data)
+
++ @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
+ def test_urllib_request_http(self):
+ """
+ This site (python-future.org) uses plain http (as of 2014-09-23).
+
+--- a/tests/test_future/test_requests.orig.py 2014-11-21 12:52:03.000000000 +0100
++++ b/tests/test_future/test_requests.py 2015-09-02 11:39:01.509378296 +0200
+@@ -57,6 +57,7 @@
+ This class tests whether the requests module conflicts with the
+ standard library import hooks, as in issue #19.
+ """
++ @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
+ def test_remove_hooks_then_requests(self):
+ code = """
+ from future import standard_library
+@@ -79,6 +80,7 @@
+ self.assertTrue(True)
+
+
++ @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
+ def test_requests_cm(self):
+ """
+ Tests whether requests can be used importing standard_library modules
+
diff --git a/dev-python/future/files/future-0.16.0-fix-tests-py37.patch b/dev-python/future/files/future-0.16.0-fix-tests-py37.patch
new file mode 100644
index 000000000000..d925d49f983e
--- /dev/null
+++ b/dev-python/future/files/future-0.16.0-fix-tests-py37.patch
@@ -0,0 +1,43 @@
+commit ce4f015978d250718ec8dd9f50721da90a9bd18b
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Mon Aug 20 12:42:29 2018 +0200
+
+ Skip int() keyword tests with Python 3.7
+
+ The first argument must be positional since
+ https://github.com/python/cpython/commit/2e5642422f6234fd8d0c082142b27340e588f96e
+
+diff --git a/tests/test_future/test_int.py b/tests/test_future/test_int.py
+index f1d9c5d..e306550 100644
+--- a/tests/test_future/test_int.py
++++ b/tests/test_future/test_int.py
+@@ -265,6 +265,9 @@ class IntTestCases(unittest.TestCase):
+ def test_no_args(self):
+ self.assertEqual(int(), 0)
+
++ @unittest.skipIf(sys.version_info >= (3, 7),
++ "The first parameter must be positional with Python >= 3.7"
++ )
+ def test_keyword_args(self):
+ # Test invoking int() using keyword arguments.
+ self.assertEqual(int(x=1.2), 1)
+
+commit d7a3451753982d944ae0894c9e9f01d0460d03d5
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Mon Aug 20 11:17:59 2018 +0200
+
+ Make test_bad_status_repr work for Python 3.7
+
+diff --git a/tests/test_future/test_httplib.py b/tests/test_future/test_httplib.py
+index 968e933..a1e2b19 100644
+--- a/tests/test_future/test_httplib.py
++++ b/tests/test_future/test_httplib.py
+@@ -197,7 +197,7 @@ class BasicTest(TestCase):
+ if not utils.PY3:
+ self.assertEqual(repr(exc), '''BadStatusLine("u\'\'",)''')
+ else:
+- self.assertEqual(repr(exc), '''BadStatusLine("\'\'",)''')
++ self.assertIn(repr(exc), ('''BadStatusLine("''",)''', '''BadStatusLine("''")'''))
+
+ def test_partial_reads(self):
+ # if we have a length, the system knows when to close itself