Reset the global tool state singleton before each test with permissive limits.
()
| 38 | |
| 39 | @pytest.fixture(autouse=True) |
| 40 | def _fresh_tool_state(): |
| 41 | """Reset the global tool state singleton before each test with permissive limits.""" |
| 42 | reset_tool_state() |
| 43 | _guard_mgr._tool_state = ToolStateManager( |
| 44 | limits=RuntimeLimits( |
| 45 | per_tool_cap=100, |
| 46 | tool_budget_total=100, |
| 47 | discovery_budget=50, |
| 48 | execution_budget=50, |
| 49 | ) |
| 50 | ) |
| 51 | yield |
| 52 | reset_tool_state() |
| 53 | |
| 54 | |
| 55 | # --------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected