Skip to content

Commit

Permalink
Fix mock assertion in ICU recipe
Browse files Browse the repository at this point in the history
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 kivy#3002
  • Loading branch information
s-t-e-v-e-n-k committed Apr 9, 2024
1 parent 8110faf commit 5d5ca2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/recipes/test_icu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5d5ca2b

Please sign in to comment.