test: compare canonical worker paths when Windows uses short aliases

This commit is contained in:
阿白叔 committed 2026-10-21 15:53:51 +08:00
1 parent a8358d90d7
commit 74c1cb752c
1 file changed
+9 -10
+9 -10
View File
@@ -360,16 +360,15 @@ def test_execute_quick_step_launches_automatic_runtime_and_reports_completion(tm
result = preparer.execute_step("task", (project,), (rule,)) result = preparer.execute_step("task", (project,), (rule,))
assert calls == [ assert len(calls) == 1
(( command, timeout = calls[0]
"C:\\Windows\\SysWOW64\\cscript.exe", assert timeout == 150
"//nologo", assert command[:2] == ("C:\\Windows\\SysWOW64\\cscript.exe", "//nologo")
str(result.script_path), # Long evidence paths legitimately use 8.3 names or a managed alias.
str(tmp_path / "quick-run"), assert Path(command[2]).resolve() == result.script_path.resolve()
*_native_helper_launch_arguments(), assert Path(command[3]).resolve() == (tmp_path / 'quick-run').resolve()
_command_field(result.command_path, "job_id"), assert command[4:] == (*_native_helper_launch_arguments(),
), 150) _command_field(result.command_path, 'job_id'))
]
assert result.state == "restored_ok" assert result.state == "restored_ok"
assert result.message == "Replaced and verified 2 current-sheet matches." assert result.message == "Replaced and verified 2 current-sheet matches."