commit: 6e66c2350974451b2549f62bc18f4d7e40fbe94d Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> AuthorDate: Sun Oct 22 07:09:31 2023 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Sun Oct 22 07:09:31 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6e66c235
dev-python/Pyro5: fix test failure Add patch from upstream. Bug: https://bugs.gentoo.org/915997 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org> dev-python/Pyro5/Pyro5-5.15-r1.ebuild | 5 ++- .../Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch | 36 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/dev-python/Pyro5/Pyro5-5.15-r1.ebuild b/dev-python/Pyro5/Pyro5-5.15-r1.ebuild index fb02557a55..44874b2920 100644 --- a/dev-python/Pyro5/Pyro5-5.15-r1.ebuild +++ b/dev-python/Pyro5/Pyro5-5.15-r1.ebuild @@ -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) ) diff --git a/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch b/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch new file mode 100644 index 0000000000..fb92d88b6f --- /dev/null +++ b/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch @@ -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 <ir...@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