[packages/python3] Run tests verbose; fix part of test_site test

arekm arekm at pld-linux.org
Tue Oct 8 15:55:37 CEST 2024


commit 1f4ac8845b9d038ef5d24eabacd9c750913e0ff2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 8 15:15:11 2024 +0200

    Run tests verbose; fix part of test_site test

 python3-tests.patch | 20 +++++++++++++++++++-
 python3.spec        |  6 ++++--
 2 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/python3.spec b/python3.spec
index e942d9d..71b2d7f 100644
--- a/python3.spec
+++ b/python3.spec
@@ -549,8 +549,10 @@ END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
 LC_ALL=C.UTF-8
 export LC_ALL
 %if %{with tests}
-WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \
-	TESTOPTS="%{test_flags} %{test_list}"
+WITHIN_PYTHON_RPM_BUILD=1 \
+EXTRATESTOPTS="-v" \
+	%{__make} test \
+		TESTOPTS="%{test_flags} %{test_list}"
 %endif
 
 %if %{with info}
diff --git a/python3-tests.patch b/python3-tests.patch
index 6695810..dff75eb 100644
--- a/python3-tests.patch
+++ b/python3-tests.patch
@@ -19,4 +19,22 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Li
          self.assertIn(cm.exception.errno, expected_errnos)
  
  
-
+--- a/Lib/test/test_site.py	2024-10-07 07:02:14.000000000 +0200
++++ b/Lib/test/test_site.py.new	2024-10-08 14:14:57.416459147 +0200
+@@ -326,14 +326,14 @@ class HelperFunctionsTests(unittest.Test
+         if os.sep == '/':
+             # OS X, Linux, FreeBSD, etc
+             if sys.platlibdir != "lib":
+-                self.assertEqual(len(dirs), 2)
++                self.assertEqual(len(dirs), 6)
+                 wanted = os.path.join('xoxo', sys.platlibdir,
+                                       f'python{sysconfig._get_python_version_abi()}',
+                                       'site-packages')
+                 self.assertEqual(dirs[0], wanted)
+             else:
+                 self.assertEqual(len(dirs), 1)
+-            wanted = os.path.join('xoxo', 'lib',
++            wanted = os.path.join('xoxo', 'share',
+                                   f'python{sysconfig._get_python_version_abi()}',
+                                   'site-packages')
+             self.assertEqual(dirs[-1], wanted)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3.git/commitdiff/1f4ac8845b9d038ef5d24eabacd9c750913e0ff2



More information about the pld-cvs-commit mailing list