1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

Run unit tests on Windows/MacOS as well. (#5018)

* Run unit tests on Windows as well.

* Test on mac.

* Continue running on error.

* Compared normalized paths to work cross platform.

* Only test common set of mimetypes across operating systems.
This commit is contained in:
Robin Huang
2024-09-22 18:01:39 +09:00
committed by GitHub
parent a55142f904
commit 6ad0ddbae4
3 changed files with 13 additions and 6 deletions

View File

@@ -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()