Skip to content

Commit 3dd3436

Browse files
authored
fix(docs): Fix broken pytest example code (#398)
1 parent 189eeba commit 3dd3436

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/evaluate/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,12 @@ Here is an example of a `pytest` test case that runs a single test file:
369369

370370
```py
371371
from google.adk.evaluation.agent_evaluator import AgentEvaluator
372+
import pytest
372373

373-
def test_with_single_test_file():
374+
@pytest.mark.asyncio
375+
async def test_with_single_test_file():
374376
"""Test the agent's basic ability via a session file."""
375-
AgentEvaluator.evaluate(
377+
await AgentEvaluator.evaluate(
376378
agent_module="home_automation_agent",
377379
eval_dataset_file_path_or_dir="tests/integration/fixture/home_automation_agent/simple_test.test.json",
378380
)

0 commit comments

Comments
 (0)