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

Method run_test

tests/unittests/test_runners.py:948–962  ·  view source on GitHub ↗

Prepares the test by creating a session and running the runner.

(self, original_user_input="Hello")

Source from the content-addressed store, hash-verified

946 )
947
948 async def run_test(self, original_user_input="Hello") -> list[Event]:
949 """Prepares the test by creating a session and running the runner."""
950 await self.session_service.create_session(
951 app_name=TEST_APP_ID, user_id=TEST_USER_ID, session_id=TEST_SESSION_ID
952 )
953 events = []
954 async for event in self.runner.run_async(
955 user_id=TEST_USER_ID,
956 session_id=TEST_SESSION_ID,
957 new_message=types.Content(
958 role="user", parts=[types.Part(text=original_user_input)]
959 ),
960 ):
961 events.append(event)
962 return events
963
964 @pytest.mark.asyncio
965 async def test_runner_is_initialized_with_plugins(self):

Calls 3

create_sessionMethod · 0.45
run_asyncMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected