Skip to content

Conversation

@didier-durand
Copy link
Contributor

Description

Hi,

As title says, adding 19 tests for agent_execution/context.py

They all pass: see execution below.

Regards,

Didier

test execution

============================= test session starts ==============================
collecting ... collected 130 items

client/test_client.py::TestA2ACardResolver::test_init_strips_slashes PASSED [  0%]
client/test_client.py::TestA2ACardResolver::test_get_agent_card_success PASSED [  1%]
client/test_client.py::TestA2ACardResolver::test_get_agent_card_http_status_error PASSED [  2%]
client/test_client.py::TestA2ACardResolver::test_get_agent_card_json_decode_error PASSED [  3%]
client/test_client.py::TestA2ACardResolver::test_get_agent_card_request_error PASSED [  3%]
client/test_client.py::TestA2AClient::test_init_with_agent_card PASSED   [  4%]
client/test_client.py::TestA2AClient::test_init_with_url PASSED          [  5%]
client/test_client.py::TestA2AClient::test_init_with_agent_card_and_url_prioritizes_agent_card PASSED [  6%]
client/test_client.py::TestA2AClient::test_init_raises_value_error_if_no_card_or_url PASSED [  6%]
client/test_client.py::TestA2AClient::test_get_client_from_agent_card_url_success PASSED [  7%]
client/test_client.py::TestA2AClient::test_get_client_from_agent_card_url_resolver_error PASSED [  8%]
client/test_client.py::TestA2AClient::test_send_message_success_use_request PASSED [  9%]
client/test_client.py::TestA2AClient::test_send_message_error_response PASSED [ 10%]
client/test_client.py::TestA2AClient::test_send_message_streaming_success_request PASSED [ 10%]
client/test_client.py::TestA2AClient::test_get_task_success_use_request PASSED [ 11%]
client/test_client.py::TestA2AClient::test_get_task_error_response PASSED [ 12%]
client/test_client.py::TestA2AClient::test_cancel_task_success_use_request PASSED [ 13%]
client/test_client.py::TestA2AClient::test_cancel_task_error_response PASSED [ 13%]
server/agent_execution/test_context.py::TestRequestContext::test_init_without_params PASSED [ 14%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_params_no_ids PASSED [ 15%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_task_id PASSED [ 16%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_context_id PASSED [ 16%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_both_ids PASSED [ 17%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_task PASSED [ 18%]
server/agent_execution/test_context.py::TestRequestContext::test_get_user_input_no_params PASSED [ 19%]
server/agent_execution/test_context.py::TestRequestContext::test_attach_related_task PASSED [ 20%]
server/agent_execution/test_context.py::TestRequestContext::test_current_task_property PASSED [ 20%]
server/agent_execution/test_context.py::TestRequestContext::test_check_or_generate_task_id_no_params PASSED [ 21%]
server/agent_execution/test_context.py::TestRequestContext::test_check_or_generate_task_id_with_existing_task_id PASSED [ 22%]
server/agent_execution/test_context.py::TestRequestContext::test_check_or_generate_context_id_no_params PASSED [ 23%]
server/agent_execution/test_context.py::TestRequestContext::test_check_or_generate_context_id_with_existing_context_id PASSED [ 23%]
server/agent_execution/test_context.py::TestRequestContext::test_with_related_tasks_provided PASSED [ 24%]
server/agent_execution/test_context.py::TestRequestContext::test_message_property_without_params PASSED [ 25%]
server/agent_execution/test_context.py::TestRequestContext::test_message_property_with_params PASSED [ 26%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_existing_ids_in_message PASSED [ 26%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_task_id_and_existing_task_id_match PASSED [ 27%]
server/agent_execution/test_context.py::TestRequestContext::test_init_with_context_id_and_existing_context_id_match PASSED [ 28%]
server/events/test_event_consumer.py::test_consume_one_task_event PASSED [ 29%]
server/events/test_event_consumer.py::test_consume_one_message_event PASSED [ 30%]
server/events/test_event_consumer.py::test_consume_one_a2a_error_event PASSED [ 30%]
server/events/test_event_consumer.py::test_consume_one_jsonrpc_error_event PASSED [ 31%]
server/events/test_event_consumer.py::test_consume_one_queue_empty PASSED [ 32%]
server/events/test_event_consumer.py::test_consume_all_multiple_events PASSED [ 33%]
server/events/test_event_consumer.py::test_consume_until_message PASSED  [ 33%]
server/events/test_event_consumer.py::test_consume_message_events PASSED [ 34%]
server/events/test_event_queue.py::test_enqueue_and_dequeue_event PASSED [ 35%]
server/events/test_event_queue.py::test_dequeue_event_no_wait PASSED     [ 36%]
server/events/test_event_queue.py::test_dequeue_event_empty_queue_no_wait PASSED [ 36%]
server/events/test_event_queue.py::test_dequeue_event_wait PASSED        [ 37%]
server/events/test_event_queue.py::test_task_done PASSED                 [ 38%]
server/events/test_event_queue.py::test_enqueue_different_event_types PASSED [ 39%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_cancel_task_not_found PASSED [ 40%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_cancel_task_not_supported PASSED [ 40%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_cancel_task_success PASSED [ 41%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_get_task_not_found PASSED [ 42%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_get_task_success PASSED [ 43%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_message_error PASSED [ 43%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_message_new_message_success PASSED [ 44%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_message_new_message_with_existing_task_success PASSED [ 45%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_message_stream_new_message_existing_task_success PASSED [ 46%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_message_stream_new_message_success PASSED [ 46%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_resubscribe_existing_task_success PASSED [ 47%]
server/request_handlers/test_jsonrpc_handler.py::TestJSONRPCtHandler::test_on_resubscribe_no_existing_task_error PASSED [ 48%]
server/tasks/test_inmemory_task_store.py::test_in_memory_task_store_save_and_get PASSED [ 49%]
server/tasks/test_inmemory_task_store.py::test_in_memory_task_store_get_nonexistent PASSED [ 50%]
server/tasks/test_inmemory_task_store.py::test_in_memory_task_store_delete PASSED [ 50%]
server/tasks/test_inmemory_task_store.py::test_in_memory_task_store_delete_nonexistent PASSED [ 51%]
server/tasks/test_task_manager.py::test_get_task_existing PASSED         [ 52%]
server/tasks/test_task_manager.py::test_get_task_nonexistent PASSED      [ 53%]
server/tasks/test_task_manager.py::test_save_task_event_new_task PASSED  [ 53%]
server/tasks/test_task_manager.py::test_save_task_event_status_update PASSED [ 54%]
server/tasks/test_task_manager.py::test_save_task_event_artifact_update PASSED [ 55%]
server/tasks/test_task_manager.py::test_ensure_task_existing PASSED      [ 56%]
server/tasks/test_task_manager.py::test_ensure_task_nonexistent PASSED   [ 56%]
server/tasks/test_task_manager.py::test_init_task_obj PASSED             [ 57%]
server/tasks/test_task_manager.py::test_save_task PASSED                 [ 58%]
server/tasks/test_task_manager.py::test_save_task_event_new_task_no_task_id PASSED [ 59%]
server/tasks/test_task_manager.py::test_get_task_no_task_id PASSED       [ 60%]
server/tasks/test_task_manager.py::test_save_task_event_no_task_existing PASSED [ 60%]
test_types.py::test_agent_authentication_valid PASSED                    [ 61%]
test_types.py::test_agent_authentication_invalid PASSED                  [ 62%]
test_types.py::test_agent_capabilities PASSED                            [ 63%]
test_types.py::test_agent_provider PASSED                                [ 63%]
test_types.py::test_agent_skill_valid PASSED                             [ 64%]
test_types.py::test_agent_skill_invalid PASSED                           [ 65%]
test_types.py::test_agent_card_valid PASSED                              [ 66%]
test_types.py::test_agent_card_invalid PASSED                            [ 66%]
test_types.py::test_text_part PASSED                                     [ 67%]
test_types.py::test_file_part_variants PASSED                            [ 68%]
test_types.py::test_data_part PASSED                                     [ 69%]
test_types.py::test_part_root_model PASSED                               [ 70%]
test_types.py::test_message PASSED                                       [ 70%]
test_types.py::test_task_status PASSED                                   [ 71%]
test_types.py::test_task PASSED                                          [ 72%]
test_types.py::test_jsonrpc_error PASSED                                 [ 73%]
test_types.py::test_jsonrpc_request PASSED                               [ 73%]
test_types.py::test_jsonrpc_error_response PASSED                        [ 74%]
test_types.py::test_jsonrpc_response_root_model PASSED                   [ 75%]
test_types.py::test_send_message_request PASSED                          [ 76%]
test_types.py::test_send_subscribe_request PASSED                        [ 76%]
test_types.py::test_get_task_request PASSED                              [ 77%]
test_types.py::test_cancel_task_request PASSED                           [ 78%]
test_types.py::test_get_task_response PASSED                             [ 79%]
test_types.py::test_send_message_response PASSED                         [ 80%]
test_types.py::test_cancel_task_response PASSED                          [ 80%]
test_types.py::test_send_message_streaming_status_update_response PASSED [ 81%]
test_types.py::test_send_message_streaming_artifact_update_response PASSED [ 82%]
test_types.py::test_set_task_push_notification_response PASSED           [ 83%]
test_types.py::test_get_task_push_notification_response PASSED           [ 83%]
test_types.py::test_a2a_request_root_model PASSED                        [ 84%]
test_types.py::test_content_type_not_supported_error PASSED              [ 85%]
test_types.py::test_task_not_found_error PASSED                          [ 86%]
test_types.py::test_push_notification_not_supported_error PASSED         [ 86%]
test_types.py::test_internal_error PASSED                                [ 87%]
test_types.py::test_invalid_params_error PASSED                          [ 88%]
test_types.py::test_invalid_request_error PASSED                         [ 89%]
test_types.py::test_json_parse_error PASSED                              [ 90%]
test_types.py::test_method_not_found_error PASSED                        [ 90%]
test_types.py::test_task_not_cancelable_error PASSED                     [ 91%]
test_types.py::test_unsupported_operation_error PASSED                   [ 92%]
test_types.py::test_task_id_params_valid PASSED                          [ 93%]
test_types.py::test_task_id_params_invalid PASSED                        [ 93%]
test_types.py::test_task_push_notification_config PASSED                 [ 94%]
test_types.py::test_jsonrpc_message_valid PASSED                         [ 95%]
test_types.py::test_jsonrpc_message_invalid PASSED                       [ 96%]
test_types.py::test_file_base_valid PASSED                               [ 96%]
test_types.py::test_file_base_invalid PASSED                             [ 97%]
test_types.py::test_part_base_valid PASSED                               [ 98%]
test_types.py::test_part_base_invalid PASSED                             [ 99%]
test_types.py::test_a2a_error_validation_and_serialization PASSED        [100%

@didier-durand didier-durand requested a review from a team as a code owner May 15, 2025 04:18
@holtskinner holtskinner merged commit d4ae0d2 into a2aproject:main May 19, 2025
5 checks passed
@didier-durand
Copy link
Contributor Author

Thanks for merging this PR.
Didier

martimfasantos pushed a commit to martimfasantos/a2a-python that referenced this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants