public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/iniparse/, dev-python/iniparse/files/
@ 2024-05-18  5:30 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-05-18  5:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3709dc49c5a6fd4290842506d5bfc735cc5611bd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 18 05:21:28 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 18 05:25:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3709dc49

dev-python/iniparse: Backport a test suite fix

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/iniparse-0.5_p20221102-py3.11.7.patch    | 27 ++++++++++++++++++++++
 dev-python/iniparse/iniparse-0.5_p20221102.ebuild  |  9 ++++++--
 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() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-18  5:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-18  5:30 [gentoo-commits] repo/gentoo:master commit in: dev-python/iniparse/, dev-python/iniparse/files/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox