File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,8 @@ async def _run_interactor_test(
242242 # 获取通信结果
243243 if comm_task and not comm_task .cancelled ():
244244 result = comm_task .result ()
245- return result
245+ if result :
246+ return result
246247
247248 except TimeoutError :
248249 interactor .kill ()
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ async def test_interactor_with_reference_solution():
114114 pytest .skip ("g++ not available" )
115115
116116 from autocode_mcp .tools .solution import SolutionBuildTool
117+ from autocode_mcp .utils .platform import get_exe_extension
117118
118119 tool = InteractorBuildTool ()
119120 sol_tool = SolutionBuildTool ()
@@ -123,9 +124,9 @@ async def test_interactor_with_reference_solution():
123124 build_result = await tool .execute (problem_dir = tmpdir , code = INTERACTOR_CODE )
124125 assert build_result .success
125126
126- # 构建正确的参考解法 - solution_build 保存到 solutions/sol. exe
127+ # 构建正确的参考解法 - solution_build 保存到 solutions/sol< exe>
127128 await sol_tool .execute (problem_dir = tmpdir , solution_type = "sol" , code = SIMPLE_SOLUTION )
128- correct_sol_exe = os .path .join (tmpdir , "solutions" , "sol.exe " )
129+ correct_sol_exe = os .path .join (tmpdir , "solutions" , f "sol{ get_exe_extension () } " )
129130
130131 # 验证正确解法
131132 result = await tool .execute (
You can’t perform that action at this time.
0 commit comments