@@ -151,17 +151,21 @@ def test_streamed_command_events_with_real_codex_binary(tmp_path: Path) -> None:
151151 if isinstance (event , protocol .ItemCompletedNotificationModel )
152152 and isinstance (event .params .item .root , protocol .CommandExecutionThreadItem )
153153 ]
154+ command_event_context = (
155+ f"started_commands={ [item .command for item in command_started_items ]!r} \n "
156+ f"completed_commands={ [(item .command , item .exitCode , item .aggregatedOutput ) for item in command_completed_items ]!r} \n "
157+ f"final_text={ stream .final_text !r} "
158+ )
154159 assert thread .id is not None
155160 assert any (isinstance (event , protocol .TurnStartedNotificationModel ) for event in events )
156161 assert any (isinstance (event , protocol .TurnCompletedNotificationModel ) for event in events )
157- assert any ( _COMMAND_OUTPUT_UNDER_TEST in item . command for item in command_started_items )
162+ assert command_started_items , command_event_context
158163 assert any (
159- _COMMAND_OUTPUT_UNDER_TEST in item .command
160- and item .exitCode == 0
164+ item .exitCode == 0
161165 and item .aggregatedOutput is not None
162166 and _COMMAND_OUTPUT_UNDER_TEST in item .aggregatedOutput
163167 for item in command_completed_items
164- )
168+ ), command_event_context
165169 assert stream .final_turn is not None
166170 assert stream .final_turn .status .root == "completed"
167171 assert stream .final_text .strip () == "OK"
0 commit comments