commit:     d2a0987166cafb44253c860d21845ef25f2578b7
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 22 20:12:02 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Mar 22 21:17:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2a09871

net-misc/gallery-dl: use unittest runner; disable net

Closes: https://bugs.gentoo.org/927526
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 net-misc/gallery-dl/gallery-dl-1.26.8.ebuild | 11 ++++++++---
 net-misc/gallery-dl/gallery-dl-9999.ebuild   | 11 +++++++++--
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/net-misc/gallery-dl/gallery-dl-1.26.8.ebuild 
b/net-misc/gallery-dl/gallery-dl-1.26.8.ebuild
index 736c8bce293d..310c7066bc74 100644
--- a/net-misc/gallery-dl/gallery-dl-1.26.8.ebuild
+++ b/net-misc/gallery-dl/gallery-dl-1.26.8.ebuild
@@ -25,14 +25,19 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-PROPERTIES="test_network"                       # Tests require network access.
-RESTRICT="test"
 
 RDEPEND="
        >=dev-python/requests-2.11.0[${PYTHON_USEDEP}]
 "
 
-distutils_enable_tests setup.py
+distutils_enable_tests unittest
+
+src_prepare() {
+       # Tests against real servers, some tests always fail and some are 
subject to change.
+       rm test/test_results.py || die
+
+       distutils-r1_src_prepare
+}
 
 python_compile_all() {
        emake PYTHON="${EPYTHON}" data/completion/{,_}gallery-dl man

diff --git a/net-misc/gallery-dl/gallery-dl-9999.ebuild 
b/net-misc/gallery-dl/gallery-dl-9999.ebuild
index b8a8623c53a8..fc74f32338d2 100644
--- a/net-misc/gallery-dl/gallery-dl-9999.ebuild
+++ b/net-misc/gallery-dl/gallery-dl-9999.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
@@ -32,7 +32,14 @@ RDEPEND="
        >=dev-python/requests-2.11.0[${PYTHON_USEDEP}]
 "
 
-distutils_enable_tests setup.py
+distutils_enable_tests unittest
+
+src_prepare() {
+       # Tests against real servers, some tests always fail and some are 
subject to change.
+       rm test/test_results.py || die
+
+       distutils-r1_src_prepare
+}
 
 python_compile_all() {
        emake PYTHON="${EPYTHON}" data/completion/{,_}gallery-dl man

Reply via email to