Skip to content

Commit

Permalink
Fix comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Sep 12, 2024
1 parent f57b44e commit 96a0127
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests-unit/utils/extra_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def yaml_config_with_appdata():
return """
test_config:
base_path: '%APPDATA%/ComfyUI'
checkpoints: 'models'
checkpoints: 'models/checkpoints'
"""

@pytest.fixture
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_load_extra_model_paths_expands_appdata(
yaml_config_with_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

# Attach mocks
Expand All @@ -111,12 +111,12 @@ def test_load_extra_model_paths_expands_appdata(

expected_base_path = 'C:/Users/TestUser/AppData/Roaming/ComfyUI'
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)

# 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):
assert actual_call.args == expected_call

Expand Down

0 comments on commit 96a0127

Please sign in to comment.