summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-18 07:21:28 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-18 07:25:16 +0200
commit3709dc49c5a6fd4290842506d5bfc735cc5611bd (patch)
tree8d9dff560238cbf768390dacfe72cc3e407fc733 /dev-python/iniparse
parentdev-python/jsonpatch: Enable py3.13 (diff)
downloadgentoo-3709dc49c5a6fd4290842506d5bfc735cc5611bd.tar.gz
gentoo-3709dc49c5a6fd4290842506d5bfc735cc5611bd.tar.bz2
gentoo-3709dc49c5a6fd4290842506d5bfc735cc5611bd.zip
dev-python/iniparse: Backport a test suite fix
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/iniparse')
-rw-r--r--dev-python/iniparse/files/iniparse-0.5_p20221102-py3.11.7.patch27
-rw-r--r--dev-python/iniparse/iniparse-0.5_p20221102.ebuild9
2 files changed, 34 insertions, 2 deletions
diff --git a/dev-python/iniparse/files/iniparse-0.5_p20221102-py3.11.7.patch b/dev-python/iniparse/files/iniparse-0.5_p20221102-py3.11.7.patch
new file mode 100644
index 000000000000..e2c71c0fd582
--- /dev/null
+++ b/dev-python/iniparse/files/iniparse-0.5_p20221102-py3.11.7.patch
@@ -0,0 +1,27 @@
+From 033c0aa3e1a51cb70a97762252059e70cc2f671c Mon Sep 17 00:00:00 2001
+From: Daniel Garcia Moreno <daniel.garcia@suse.com>
+Date: Wed, 20 Dec 2023 12:40:14 +0100
+Subject: [PATCH] Fix tests with python 3.11.7
+
+---
+ tests/test_compat.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tests/test_compat.py b/tests/test_compat.py
+index 8d7c785..86d0524 100644
+--- a/tests/test_compat.py
++++ b/tests/test_compat.py
+@@ -1,3 +1,4 @@
++import os
+ from iniparse import compat as ConfigParser
+ from io import StringIO
+ try:
+@@ -263,6 +264,8 @@ class mystr(str):
+
+ def test_read_returns_file_list(self):
+ file1 = test_support.findfile("cfgparser.1")
++ if not os.path.exists(file1):
++ file1 = test_support.findfile("configdata/cfgparser.1")
+ # check when we pass a mix of readable and non-readable files:
+ cf = self.newconfig()
+ parsed_files = cf.read([file1, "nonexistant-file"])
diff --git a/dev-python/iniparse/iniparse-0.5_p20221102.ebuild b/dev-python/iniparse/iniparse-0.5_p20221102.ebuild
index f6c69f6ad934..ed1508ff92c5 100644
--- a/dev-python/iniparse/iniparse-0.5_p20221102.ebuild
+++ b/dev-python/iniparse/iniparse-0.5_p20221102.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
@@ -33,8 +33,13 @@ BDEPEND="
${RDEPEND}
"
+PATCHES=(
+ # https://github.com/candlepin/python-iniparse/pull/29
+ "${FILESDIR}/${P}-py3.11.7.patch"
+)
+
python_test() {
- "${EPYTHON}" runtests.py || die
+ "${EPYTHON}" runtests.py -v || die
}
python_install_all() {