MCPcopy Index your code
hub / github.com/google/adk-python / create_test_eval_set

Function create_test_eval_set

tests/unittests/cli/test_fast_api.py:785–810  ·  view source on GitHub ↗

Create a test eval set using the mocked eval sets manager.

(
    test_app, test_session_info, mock_eval_sets_manager
)

Source from the content-addressed store, hash-verified

783
784@pytest.fixture
785async def create_test_eval_set(
786 test_app, test_session_info, mock_eval_sets_manager
787):
788 """Create a test eval set using the mocked eval sets manager."""
789 _ = mock_eval_sets_manager.create_eval_set(
790 app_name=test_session_info["app_name"],
791 eval_set_id="test_eval_set_id",
792 )
793 test_eval_case = EvalCase(
794 eval_id="test_eval_case_id",
795 conversation=[
796 Invocation(
797 invocation_id="test_invocation_id",
798 user_content=types.Content(
799 parts=[types.Part(text="test_user_content")],
800 role="user",
801 ),
802 )
803 ],
804 )
805 _ = mock_eval_sets_manager.add_eval_case(
806 app_name=test_session_info["app_name"],
807 eval_set_id="test_eval_set_id",
808 eval_case=test_eval_case,
809 )
810 return test_session_info
811
812
813@pytest.fixture

Callers

nothing calls this directly

Calls 4

EvalCaseClass · 0.90
InvocationClass · 0.90
create_eval_setMethod · 0.45
add_eval_caseMethod · 0.45

Tested by

no test coverage detected