Skip to content

Commit 5d5ca2b

Browse files
committed
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
1 parent 8110faf commit 5d5ca2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/recipes/test_icu.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ def test_build_arch(
5252

5353
# We expect some calls to `sh.Command`
5454
build_root = self.recipe.get_build_dir(self.arch.arch)
55-
mock_sh_command.has_calls(
55+
mock_sh_command.assert_has_calls(
5656
[
5757
mock.call(
5858
os.path.join(build_root, "source", "runConfigureICU")
5959
),
6060
mock.call(os.path.join(build_root, "source", "configure")),
61-
]
61+
],
62+
any_order=True
6263
)
6364
mock_ensure_dir.assert_called()
6465
mock_chdir.assert_called()

0 commit comments

Comments
 (0)