def test_convert_single_turn_text_only():
  """Test a single user query followed by a single agent text response."""
  events = [
      build_event("user", [{"text": "What is the time?"}]),
      build_event("root_agent", [{"text": "It is 3 PM."}]),
  ]
  session = Session(id="s1", app_name="app", user_id="u1", events=events)
  expected = [{
      "query": "What is the time?",
      "expected_tool_use": [],
      "expected_intermediate_agent_responses": [],
      "reference": "It is 3 PM.",
  }]
  assert convert_session_to_eval_format(session) == expected
Test a single user query followed by a single agent text response.
tests/unittests/cli/utils/test_evals.py