From b1e608faac2d815d4d38c8d65d24f830c52d59da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Van=C4=9Bk?= Date: Wed, 29 May 2024 00:03:28 +0200 Subject: dev-python/paramiko: fix tests with >=pytest-8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SSHConfig related tests are failing since pytest 8.1. The issue was already addressed in PR [1] in upstream, which is backported in this commit. [1] https://github.com/paramiko/paramiko/pull/2306 Signed-off-by: Petr Vaněk --- .../files/paramiko-3.4.0-pytest-fixes.patch | 34 ++++++++++++++++++++++ dev-python/paramiko/paramiko-3.4.0.ebuild | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch (limited to 'dev-python') diff --git a/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch b/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch new file mode 100644 index 0000000000000..5d8eb3ffbb432 --- /dev/null +++ b/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch @@ -0,0 +1,34 @@ +From 71dd9c098b800a358065070a44d2803b759f222a Mon Sep 17 00:00:00 2001 +From: marston +Date: Wed, 27 Sep 2023 21:04:25 -0400 +Subject: [PATCH] Fix deprecated nose tests and 'isSet()' + +Upstream-PR: https://github.com/paramiko/paramiko/pull/2306 +Upstream-Issue: https://github.com/paramiko/paramiko/issues/2290 + +diff --git a/tests/test_client.py b/tests/test_client.py +index 1c0c6c84b..feb27bbec 100644 +--- a/tests/test_client.py ++++ b/tests/test_client.py +@@ -689,7 +689,7 @@ def _setup_for_env(self): + ) + + self.event.wait(1.0) +- self.assertTrue(self.event.isSet()) ++ self.assertTrue(self.event.is_set()) + self.assertTrue(self.ts.is_active()) + + def test_update_environment(self): +diff --git a/tests/test_config.py b/tests/test_config.py +index 2e49aa3de..1e623e0ad 100644 +--- a/tests/test_config.py ++++ b/tests/test_config.py +@@ -53,7 +53,7 @@ def load_config(name): + + + class TestSSHConfig: +- def setup(self): ++ def setup_method(self): + self.config = load_config("robey") + + def test_init(self): diff --git a/dev-python/paramiko/paramiko-3.4.0.ebuild b/dev-python/paramiko/paramiko-3.4.0.ebuild index 0d9df530e354a..3ca6df11fc949 100644 --- a/dev-python/paramiko/paramiko-3.4.0.ebuild +++ b/dev-python/paramiko/paramiko-3.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -44,6 +44,7 @@ EPYTEST_DESELECT=( src_prepare() { local PATCHES=( "${FILESDIR}/${PN}-3.2.0-nih-test-deps.patch" + "${FILESDIR}/${PN}-3.4.0-pytest-fixes.patch" ) if ! use server; then -- cgit v1.2.3