mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-11 23:20:07 +08:00
Fix comments.
This commit is contained in:
parent
f57b44e655
commit
96a0127a2e
@ -24,7 +24,7 @@ def yaml_config_with_appdata():
|
|||||||
return """
|
return """
|
||||||
test_config:
|
test_config:
|
||||||
base_path: '%APPDATA%/ComfyUI'
|
base_path: '%APPDATA%/ComfyUI'
|
||||||
checkpoints: 'models'
|
checkpoints: 'models/checkpoints'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
@ -95,7 +95,7 @@ def test_load_extra_model_paths_expands_appdata(
|
|||||||
yaml_config_with_appdata,
|
yaml_config_with_appdata,
|
||||||
mock_yaml_content_appdata
|
mock_yaml_content_appdata
|
||||||
):
|
):
|
||||||
# Set the mock_file to return our YAML content
|
# Set the mock_file to return yaml with appdata as a variable
|
||||||
mock_file.return_value.read.return_value = yaml_config_with_appdata
|
mock_file.return_value.read.return_value = yaml_config_with_appdata
|
||||||
|
|
||||||
# Attach mocks
|
# Attach mocks
|
||||||
@ -111,12 +111,12 @@ def test_load_extra_model_paths_expands_appdata(
|
|||||||
|
|
||||||
expected_base_path = 'C:/Users/TestUser/AppData/Roaming/ComfyUI'
|
expected_base_path = 'C:/Users/TestUser/AppData/Roaming/ComfyUI'
|
||||||
expected_calls = [
|
expected_calls = [
|
||||||
('checkpoints', os.path.join(expected_base_path, 'models')),
|
('checkpoints', os.path.join(expected_base_path, 'models/checkpoints')),
|
||||||
]
|
]
|
||||||
|
|
||||||
assert mock_add_model_folder_path.call_count == len(expected_calls)
|
assert mock_add_model_folder_path.call_count == len(expected_calls)
|
||||||
|
|
||||||
# Check if add_model_folder_path was called with the correct arguments
|
# Check the base path variable was expanded
|
||||||
for actual_call, expected_call in zip(mock_add_model_folder_path.call_args_list, expected_calls):
|
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 == expected_call
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user