def test_convert_single_turn_tool_only():
  """Test a single user query followed by a single agent tool call."""
  events = [
      build_event("user", [{"text": "Get weather for Seattle"}]),
      build_event(
          "root_agent",
          [{"func_name": "get_weather", "func_args": {"city": "Seattle"}}],
      ),
  ]
  session = Session(id="s1", app_name="app", user_id="u1", events=events)
  expected = [{
      "query": "Get weather for Seattle",
      "expected_tool_use": [
          {"tool_name": "get_weather", "tool_input": {"city": "Seattle"}}
      ],
      "expected_intermediate_agent_responses": [],
      "reference": "",
  }]
  assert convert_session_to_eval_format(session) == expected
Test a single user query followed by a single agent tool call.
tests/unittests/cli/utils/test_evals.py