From 2d277d924d5239038a33e267d8285b51c544c4aa Mon Sep 17 00:00:00 2001 From: robinjhuang Date: Sun, 22 Sep 2024 16:33:18 +0900 Subject: [PATCH] Compared normalized paths to work cross platform. --- tests-unit/utils/extra_config_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests-unit/utils/extra_config_test.py b/tests-unit/utils/extra_config_test.py index 0effd89e8..ef772d40b 100644 --- a/tests-unit/utils/extra_config_test.py +++ b/tests-unit/utils/extra_config_test.py @@ -78,7 +78,9 @@ def test_load_extra_model_paths_expands_userpath( # Check if add_model_folder_path was called with the correct arguments for actual_call, expected_call in zip(mock_add_model_folder_path.call_args_list, expected_calls): - assert actual_call.args == expected_call + assert actual_call.args[0] == expected_call[0] + assert os.path.normpath(actual_call.args[1]) == os.path.normpath(expected_call[1]) # Normalize and check the path to check on multiple OS. + assert actual_call.args[2] == expected_call[2] # Check if yaml.safe_load was called mock_yaml_safe_load.assert_called_once()