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,))
assert calls == [
((
"C:\\Windows\\SysWOW64\\cscript.exe",
"//nologo",
str(result.script_path),
str(tmp_path / "quick-run"),
*_native_helper_launch_arguments(),
_command_field(result.command_path, "job_id"),
), 150)
]
assert len(calls) == 1
command, timeout = calls[0]
assert timeout == 150
assert command[:2] == ("C:\\Windows\\SysWOW64\\cscript.exe", "//nologo")
# Long evidence paths legitimately use 8.3 names or a managed alias.
assert Path(command[2]).resolve() == result.script_path.resolve()
assert Path(command[3]).resolve() == (tmp_path / 'quick-run').resolve()
assert command[4:] == (*_native_helper_launch_arguments(),
_command_field(result.command_path, 'job_id'))
assert result.state == "restored_ok"
assert result.message == "Replaced and verified 2 current-sheet matches."