Skip to content

Commit c91741b

Browse files
committed
test: verify install.execute forwards skip_torch to DependencyCompiler
1 parent dd01bd4 commit c91741b

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

tests/comfy_cli/test_install_python_resolution.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,36 @@ def test_fast_deps_passes_python_to_dependency_compiler(self, tmp_path):
9898
MockCompiler.Install_Build_Deps.assert_called_once_with(executable="/resolved/python")
9999
MockCompiler.assert_called_once()
100100
assert MockCompiler.call_args[1]["executable"] == "/resolved/python"
101+
assert MockCompiler.call_args[1].get("skip_torch") in (None, False)
102+
103+
def test_fast_deps_forwards_skip_torch(self, tmp_path):
104+
repo_dir = str(tmp_path)
105+
106+
with (
107+
patch("comfy_cli.command.install.ensure_workspace_python", return_value="/resolved/python"),
108+
patch("comfy_cli.command.install.clone_comfyui"),
109+
patch("comfy_cli.command.install.check_comfy_repo", return_value=(True, None)),
110+
patch("comfy_cli.command.install.DependencyCompiler") as MockCompiler,
111+
patch("comfy_cli.command.install.WorkspaceManager"),
112+
patch.object(install.workspace_manager, "skip_prompting", True),
113+
patch.object(install.workspace_manager, "setup_workspace_manager"),
114+
):
115+
MockCompiler.Install_Build_Deps = MagicMock()
116+
mock_instance = MagicMock()
117+
MockCompiler.return_value = mock_instance
118+
119+
install.execute(
120+
url="https://github.com/test/test.git",
121+
manager_url="https://github.com/test/manager.git",
122+
comfy_path=repo_dir,
123+
restore=False,
124+
skip_manager=True,
125+
version="nightly",
126+
fast_deps=True,
127+
skip_torch_or_directml=True,
128+
)
129+
130+
assert MockCompiler.call_args[1]["skip_torch"] is True
101131

102132

103133
def _get_torch_install_cmd(calls):

0 commit comments

Comments
 (0)