mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-12 16:43:17 -04:00
dev-python/Pyro5: fix test failure
Add patch from upstream. Bug: https://bugs.gentoo.org/915997 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
@@ -26,12 +26,15 @@ RDEPEND="
|
||||
>=dev-python/serpent-1.40[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-fix-test-on-ipv6.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
distutils_enable_sphinx docs/source \
|
||||
dev-python/sphinx-rtd-theme
|
||||
|
||||
EPYTEST_DESELECT=(
|
||||
tests/test_socketutil.py::TestSocketutil::testGetInterface # https://github.com/irmen/Pyro5/issues/82
|
||||
tests/test_server.py::TestServerOnce::testRegisterWeak # https://github.com/irmen/Pyro5/issues/83 (pypy3 specific)
|
||||
)
|
||||
|
||||
|
||||
36
dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch
Normal file
36
dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
https://github.com/irmen/Pyro5/commit/8db91b617dd08508053e54dea2a781749a00ffc8.patch
|
||||
https://bugs.gentoo.org/915997
|
||||
|
||||
From 8db91b617dd08508053e54dea2a781749a00ffc8 Mon Sep 17 00:00:00 2001
|
||||
From: Irmen de Jong <irmen@razorvine.net>
|
||||
Date: Sat, 21 Oct 2023 21:48:56 +0200
|
||||
Subject: [PATCH] made getGetInterface test work with ipv6 localhost
|
||||
|
||||
---
|
||||
tests/test_socketutil.py | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/test_socketutil.py b/tests/test_socketutil.py
|
||||
index ef0720d..c9467ae 100644
|
||||
--- a/tests/test_socketutil.py
|
||||
+++ b/tests/test_socketutil.py
|
||||
@@ -56,10 +56,15 @@ def testGetIP6(self):
|
||||
|
||||
def testGetInterface(self):
|
||||
addr = socketutil.get_interface("localhost")
|
||||
- assert addr.version == 4
|
||||
- assert str(addr).startswith("127.")
|
||||
- assert str(addr.ip).startswith("127.0")
|
||||
- assert str(addr.network).startswith("127.0")
|
||||
+ if addr.version == 6:
|
||||
+ assert str(addr).startswith("::1")
|
||||
+ assert str(addr.ip) == "::1"
|
||||
+ assert str(addr.network).startswith("::1")
|
||||
+ else:
|
||||
+ assert addr.version == 4
|
||||
+ assert str(addr).startswith("127.")
|
||||
+ assert str(addr.ip).startswith("127.0")
|
||||
+ assert str(addr.network).startswith("127.0")
|
||||
if has_ipv6:
|
||||
addr = socketutil.get_interface("::1")
|
||||
assert addr.version == 6
|
||||
Reference in New Issue
Block a user