summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2014-08-12 14:06:27 +0000
committerIan Delaney <idella4@gentoo.org>2014-08-12 14:06:27 +0000
commitef2501f1d6c09e360c7e8fda7213835e10ebee5b (patch)
tree7fe18dd6c88c2011f324c4de824b573f8f4c3405
parentremoving ruby21 for bug 513284 (diff)
downloadgentoo-2-ef2501f1d6c09e360c7e8fda7213835e10ebee5b.tar.gz
gentoo-2-ef2501f1d6c09e360c7e8fda7213835e10ebee5b.tar.bz2
gentoo-2-ef2501f1d6c09e360c7e8fda7213835e10ebee5b.zip
add patches to fix testsuite
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
-rw-r--r--dev-python/dugong/ChangeLog6
-rw-r--r--dev-python/dugong/dugong-3.2.ebuild7
-rw-r--r--dev-python/dugong/files/3.2-aborted_write.patch45
-rw-r--r--dev-python/dugong/files/3.2-extract_links.patch26
-rw-r--r--dev-python/dugong/files/3.2-timeout.patch19
5 files changed, 100 insertions, 3 deletions
diff --git a/dev-python/dugong/ChangeLog b/dev-python/dugong/ChangeLog
index 902d33addc58..fbae0a56c80c 100644
--- a/dev-python/dugong/ChangeLog
+++ b/dev-python/dugong/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/dugong
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/dugong/ChangeLog,v 1.5 2014/08/11 04:58:29 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/dugong/ChangeLog,v 1.6 2014/08/12 14:06:27 idella4 Exp $
+
+ 12 Aug 2014; Ian Delaney <idella4@gentoo.org> +files/3.2-aborted_write.patch,
+ +files/3.2-extract_links.patch, +files/3.2-timeout.patch, dugong-3.2.ebuild:
+ add patches to fix testsuite
11 Aug 2014; Ian Delaney <idella4@gentoo.org> dugong-3.2.ebuild:
update test phase
diff --git a/dev-python/dugong/dugong-3.2.ebuild b/dev-python/dugong/dugong-3.2.ebuild
index 76318e6abd5a..033582e9f862 100644
--- a/dev-python/dugong/dugong-3.2.ebuild
+++ b/dev-python/dugong/dugong-3.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/dugong/dugong-3.2.ebuild,v 1.2 2014/08/11 04:58:29 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/dugong/dugong-3.2.ebuild,v 1.3 2014/08/12 14:06:27 idella4 Exp $
EAPI=5
PYTHON_COMPAT=( python3_{3,4} )
@@ -19,10 +19,13 @@ IUSE="doc examples test"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}"/${PV}-extract_links.patch
+ "${FILESDIR}"/${PV}-timeout.patch
+ "${FILESDIR}"/${PV}-aborted_write.patch )
+
python_test() {
# https://bitbucket.org/nikratio/python-dugong/issue/12
einfo "Test suite can take several minutes to complete"
- # https://bitbucket.org/nikratio/python-dugong/issue/13 14 15
py.test -v || die "Tests failed under ${EPYTHON}"
}
diff --git a/dev-python/dugong/files/3.2-aborted_write.patch b/dev-python/dugong/files/3.2-aborted_write.patch
new file mode 100644
index 000000000000..bf25a3772e15
--- /dev/null
+++ b/dev-python/dugong/files/3.2-aborted_write.patch
@@ -0,0 +1,45 @@
+https://bitbucket.org/nikratio/python-dugong/issue/13/test_aborted_write-failures-in-latest
+diff --git a/test/test_dugong.py b/test/test_dugong.py
+--- a/test/test_dugong.py
++++ b/test/test_dugong.py
+@@ -540,7 +540,7 @@
+ conn.readall()
+
+ def test_aborted_write1(conn, monkeypatch):
+- BUFSIZE = 64*1024
++ BUFSIZE = 640*1024
+
+ # Monkeypatch request handler
+ def do_PUT(self):
+@@ -561,8 +561,9 @@
+
+ # Try to write data
+ with pytest.raises(ConnectionClosed):
+- for _ in range(50):
++ for _ in range(5000):
+ conn.write(b'f' * BUFSIZE)
++ time.sleep(0.1)
+
+ # Nevertheless, try to read response
+ resp = conn.read_response()
+@@ -570,7 +571,7 @@
+ assert resp.reason == 'Please stop!'
+
+ def test_aborted_write2(conn, monkeypatch):
+- BUFSIZE = 64*1024
++ BUFSIZE = 640*1024
+
+ # Monkeypatch request handler
+ def do_PUT(self):
+@@ -589,8 +590,9 @@
+
+ # Try to write data
+ with pytest.raises(ConnectionClosed):
+- for _ in range(50):
++ for _ in range(5000):
+ conn.write(b'f' * BUFSIZE)
++ time.sleep(0.1)
+
+ # Nevertheless, try to read response
+ assert_raises(ConnectionClosed, conn.read_response)
+
diff --git a/dev-python/dugong/files/3.2-extract_links.patch b/dev-python/dugong/files/3.2-extract_links.patch
new file mode 100644
index 000000000000..0e8d251bdd86
--- /dev/null
+++ b/dev-python/dugong/files/3.2-extract_links.patch
@@ -0,0 +1,26 @@
+# HG changeset patch
+# User Nikolaus Rath <Nikolaus@rath.org>
+# Date 1407732767 25200
+# Node ID 1cfd473db8736251291e106ce6cd488011626276
+# Parent cd7ad81f4eea24e530db152edd6d8831dc5bd7bc
+Make extract_links.py Python 3.3 compatible again.
+
+Fixes issue #15.
+
+diff --git a/examples/extract_links.py b/examples/extract_links.py
+--- a/examples/extract_links.py
++++ b/examples/extract_links.py
+@@ -30,7 +30,11 @@
+
+ class LinkExtractor(HTMLParser):
+ def __init__(self):
+- super().__init__(convert_charrefs=True)
++ if sys.version_info < (3,4):
++ # Python 3.3 doesn't know about convert_charrefs
++ super().__init__()
++ else:
++ super().__init__(convert_charrefs=True)
+ self.links = []
+
+ def handle_starttag(self, tag, attrs):
+
diff --git a/dev-python/dugong/files/3.2-timeout.patch b/dev-python/dugong/files/3.2-timeout.patch
new file mode 100644
index 000000000000..5ee43f7367c7
--- /dev/null
+++ b/dev-python/dugong/files/3.2-timeout.patch
@@ -0,0 +1,19 @@
+https://bitbucket.org/nikratio/python-dugong/issue/14/test_send_timeout-ssl-failure-in-latest
+diff --git a/test/test_dugong.py b/test/test_dugong.py
+--- a/test/test_dugong.py
++++ b/test/test_dugong.py
+@@ -726,11 +728,11 @@
+
+ # We don't know how much data can be buffered, so we
+ # claim to send a lot and do so in a loop.
+- len_ = 1024**3
++ len_ = 10 * 1024**3
+ conn.send_request('PUT', '/recv_something', body=BodyFollowing(len_))
+ with pytest.raises(dugong.ConnectionTimedOut):
+ while len_ > 0:
+- conn.write(b'x' * min(len_, 16*1024))
++ conn.write(b'x' * min(len_, 640*1024))
+
+
+ DUMMY_DATA = ','.join(str(x) for x in range(10000)).encode()
+