Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-for-android for 
openSUSE:Factory checked in at 2024-09-30 15:41:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-for-android (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-for-android.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-for-android"

Mon Sep 30 15:41:15 2024 rev:9 rq:1204662 version:2024.1.21

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-for-android/python-python-for-android.changes
      2024-04-08 17:51:52.160793805 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-for-android.new.29891/python-python-for-android.changes
   2024-09-30 15:41:31.695838925 +0200
@@ -1,0 +2,7 @@
+Mon Sep 30 06:32:03 UTC 2024 - Steve Kowalik <[email protected]>
+
+- Add patch fix-mock-assertion.patch:
+  * Correct mock has_calls call.
+- Skip recalcitrant test.
+
+-------------------------------------------------------------------

New:
----
  fix-mock-assertion.patch

BETA DEBUG BEGIN:
  New:
- Add patch fix-mock-assertion.patch:
  * Correct mock has_calls call.
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-for-android.spec ++++++
--- /var/tmp/diff_new_pack.fatwbN/_old  2024-09-30 15:41:32.343865923 +0200
+++ /var/tmp/diff_new_pack.fatwbN/_new  2024-09-30 15:41:32.343865923 +0200
@@ -27,6 +27,8 @@
 Source1:        python-python-for-android-rpmlintrc
 # PATCH-FIX-OPENSUSE We don't need or want isolation when determining metadata
 Patch0:         no-isolation-for-metadata-build.patch
+# PATCH-FIX-UPSTREAM gh#kivy/python-for-android#3003
+Patch1:         fix-mock-assertion.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -34,12 +36,14 @@
 Requires:       python-appdirs
 Requires:       python-build
 Requires:       python-colorama >= 0.3.3
+Requires:       python-packaging
+Requires:       python-setuptools
+Requires:       python-sh >= 2
 Requires:       python-toml
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 Recommends:     cmake
 Recommends:     python-pip
-Recommends:     python-setuptools
 Recommends:     python-wheel
 BuildArch:      noarch
 # SECTION test requirements
@@ -108,8 +112,8 @@
 skip_tests="test_get_dep_names_of_package or test_get_package_dependencies or 
test_venv or test_get_package_as_folder or 
test_extract_metainfo_files_from_package"
 # Unable to download NDK
 skip_tests="$skip_tests or (TestToolchainCL and test_create) or 
test_create_python_bundle"
-# Broken with 3.12 - https://github.com/kivy/python-for-android/issues/3002
-skip_tests="$skip_tests or (TestIcuRecipe and test_build_arch)"
+# build_dir is somehow None
+skip_tests="$skip_tests or (TestSDL2MixerRecipe and test_get_include_dirs)"
 
 %pytest -rs tests -k "not ($skip_tests)"
 
@@ -124,6 +128,6 @@
 %license LICENSE
 %python_alternative %{_bindir}/python-for-android
 %python_alternative %{_bindir}/p4a
-%{python_sitelib}/*pythonforandroid*/
-%{python_sitelib}/*python_for_android*/
+%{python_sitelib}/pythonforandroid
+%{python_sitelib}/python_for_android-%{version}.dist-info
 

++++++ fix-mock-assertion.patch ++++++
>From 5d5ca2b57aa49c508950c927eb42d2ffe14c3cf6 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Tue, 9 Apr 2024 15:36:24 +1000
Subject: [PATCH] Fix mock assertion in ICU recipe

Python 3.12 now does not blindly any methods on mocked objects, which
masks issues. Correct the assertion of has_calls to assert_has_calls in
the ICU recipe.

Fixes #3002
---
 tests/recipes/test_icu.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/recipes/test_icu.py b/tests/recipes/test_icu.py
index 239b99e4c1..dacf65a0b4 100644
--- a/tests/recipes/test_icu.py
+++ b/tests/recipes/test_icu.py
@@ -52,13 +52,14 @@ def test_build_arch(
 
         # We expect some calls to `sh.Command`
         build_root = self.recipe.get_build_dir(self.arch.arch)
-        mock_sh_command.has_calls(
+        mock_sh_command.assert_has_calls(
             [
                 mock.call(
                     os.path.join(build_root, "source", "runConfigureICU")
                 ),
                 mock.call(os.path.join(build_root, "source", "configure")),
-            ]
+            ],
+            any_order=True
         )
         mock_ensure_dir.assert_called()
         mock_chdir.assert_called()

Reply via email to