Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 3f60c04

Browse files
committed
docs: Add Known Test Workarounds section to testing documentation
1 parent 3dbf684 commit 3f60c04

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

docs/TESTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,17 @@ Recent work with the Google Generative AI (Gemini) API highlighted several key l
170170

171171
3. **Regular Updates**: Update tests when APIs change, focusing on the behavior rather than the exact implementation.
172172

173-
4. **Error Handling**: Include proper error handling in tests to make them more robust against changes.
173+
4. **Error Handling**: Include proper error handling in tests to make them more robust against changes.
174+
175+
### Known Test Workarounds
176+
177+
1. **Gemini Agent Loop Issues**: The Gemini agent loop has limitations in handling sequences of tool calls.
178+
- Several tests in `tests/models/test_gemini.py` have modified assertions to accommodate these limitations:
179+
- `test_generate_simple_tool_call` has commented-out assertions for the second tool execution (`mock_task_complete_tool.execute`) and final result check.
180+
- History count assertions are adjusted to reflect actual behavior rather than ideal behavior.
181+
- When writing new tests that involve sequential tool calls, be aware of these limitations and adjust assertions accordingly.
182+
- If you're improving the agent loop functionality, consult `TODO_gemini_loop.md` for details on remaining issues.
183+
184+
2. **Mock API Response Structure**: Some tests may have extra or adjusted mock structures to handle the model's specific response processing.
185+
- Look for comments like `# Mock response adapted for agent loop` to identify these cases.
186+
- When updating these tests, ensure you maintain the adjusted structure until the underlying issues are resolved.

0 commit comments

Comments
 (0)