openai-agents-python/tests
2025-06-17 17:41:10 -07:00
..
fastapi Start and finish streaming trace in impl metod (#540) 2025-04-21 13:08:38 -04:00
mcp Don't cache agent tools during a run (#803) 2025-06-02 14:49:16 -04:00
model_settings Allow arbitrary kwargs in model (#842) 2025-06-10 18:14:34 -04:00
models Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
tracing Read tracing API data lazily 2025-03-21 15:32:37 -04:00
voice Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
__init__.py Initial commit 2025-03-11 09:42:28 -07:00
conftest.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
fake_model.py Prompts support (#876) 2025-06-16 15:47:48 -04:00
README.md Pretty print result classes 2025-03-17 11:11:39 -04:00
test_agent_config.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_agent_hooks.py Fix typos and misspellings (#486) 2025-04-14 10:37:13 -04:00
test_agent_prompt.py Prompts support (#876) 2025-06-16 15:47:48 -04:00
test_agent_runner.py Don't cache agent tools during a run (#803) 2025-06-02 14:49:16 -04:00
test_agent_runner_streamed.py Don't cache agent tools during a run (#803) 2025-06-02 14:49:16 -04:00
test_agent_tracing.py More fetch_normalized_spans 2025-03-21 18:31:06 +02:00
test_cancel_streaming.py More tests for cancelling streamed run (#590) 2025-04-24 14:45:03 -04:00
test_computer_action.py Initial commit 2025-03-11 09:42:28 -07:00
test_config.py make format 2025-03-11 14:54:10 -07:00
test_doc_parsing.py Initial commit 2025-03-11 09:42:28 -07:00
test_extension_filters.py Initial commit 2025-03-11 09:42:28 -07:00
test_extra_headers.py Dev/add usage details to Usage class (#726) 2025-05-20 18:23:56 +01:00
test_function_schema.py Fix function_schema name override bug (#872) 2025-06-16 10:50:20 -04:00
test_function_tool.py Added support for passing tool_call_id via the RunContextWrapper (#766) 2025-06-09 11:08:50 -04:00
test_function_tool_decorator.py Added support for passing tool_call_id via the RunContextWrapper (#766) 2025-06-09 11:08:50 -04:00
test_global_hooks.py fix typos in tests 2025-03-20 11:24:15 +01:00
test_guardrails.py Initial commit 2025-03-11 09:42:28 -07:00
test_handoff_tool.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_items_helpers.py Replace referencable_id with response_id (#508) 2025-04-14 21:37:18 -04:00
test_max_turns.py Initial commit 2025-03-11 09:42:28 -07:00
test_openai_chatcompletions.py Prompts support (#876) 2025-06-16 15:47:48 -04:00
test_openai_chatcompletions_converter.py Enable non-strict output types (#539) 2025-04-21 11:58:36 -04:00
test_openai_chatcompletions_stream.py Prompts support (#876) 2025-06-16 15:47:48 -04:00
test_openai_responses_converter.py Enable non-strict output types (#539) 2025-04-21 11:58:36 -04:00
test_output_tool.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_pretty_print.py Pretty print result classes 2025-03-17 11:11:39 -04:00
test_repl.py Add REPL run_demo_loop helper (#811) 2025-06-04 11:53:17 -04:00
test_responses.py Added support for passing tool_call_id via the RunContextWrapper (#766) 2025-06-09 11:08:50 -04:00
test_responses_tracing.py Prompts support (#876) 2025-06-16 15:47:48 -04:00
test_result_cast.py Add usage to context in streaming (#595) 2025-04-24 18:20:35 -04:00
test_run.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_run_config.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_run_error_details.py Don't cache agent tools during a run (#803) 2025-06-02 14:49:16 -04:00
test_run_step_execution.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_run_step_processing.py Allow replacing AgentRunner and TraceProvider (#720) 2025-06-17 17:41:10 -07:00
test_strict_schema.py Initial commit 2025-03-11 09:42:28 -07:00
test_tool_choice_reset.py Make the reset behavior on tool use configurable 2025-03-25 13:29:32 -04:00
test_tool_converter.py Extract chat completions conversion code into helper (#522) 2025-04-15 18:31:17 -04:00
test_tool_use_behavior.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
test_trace_processor.py Initial commit 2025-03-11 09:42:28 -07:00
test_tracing.py More fetch_normalized_spans 2025-03-21 18:31:06 +02:00
test_tracing_errors.py Convert MCP schemas to strict where possible (#414) 2025-04-01 16:50:13 -04:00
test_tracing_errors_streamed.py Added RunErrorDetails object for MaxTurnsExceeded exception (#743) 2025-05-29 16:11:33 -04:00
test_usage.py Dev/add usage details to Usage class (#726) 2025-05-20 18:23:56 +01:00
test_visualization.py Fix visualization recursion with cycle detection (#737) 2025-05-23 13:00:10 -04:00
testing_processor.py More fetch_normalized_spans 2025-03-21 18:31:06 +02:00

Tests

Before running any tests, make sure you have uv installed (and ideally run make sync after).

Running tests

make tests

Snapshots

We use inline-snapshots for some tests. If your code adds new snapshot tests or breaks existing ones, you can fix/create them. After fixing/creating snapshots, run make tests again to verify the tests pass.

Fixing snapshots

make snapshots-fix

Creating snapshots

make snapshots-update