From 74c1cb752c01eac479d20eb1358d0fccfa2bf47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=99=BD=E5=8F=94?= <11794527+absfan@user.noreply.gitee.com> Date: Wed, 21 Oct 2026 15:53:51 +0800 Subject: [PATCH] test: compare canonical worker paths when Windows uses short aliases --- tests/trial_task_center/test_quick_run.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/trial_task_center/test_quick_run.py b/tests/trial_task_center/test_quick_run.py index d48631c..c4ee758 100644 --- a/tests/trial_task_center/test_quick_run.py +++ b/tests/trial_task_center/test_quick_run.py @@ -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."