Reset the global tool state singleton before each test with permissive limits.
()
| 24 | |
| 25 | @pytest.fixture(autouse=True) |
| 26 | def _fresh_tool_state(): |
| 27 | """Reset the global tool state singleton before each test with permissive limits.""" |
| 28 | reset_tool_state() |
| 29 | _guard_mgr._tool_state = ToolStateManager( |
| 30 | limits=RuntimeLimits( |
| 31 | per_tool_cap=100, |
| 32 | tool_budget_total=100, |
| 33 | discovery_budget=50, |
| 34 | execution_budget=50, |
| 35 | ) |
| 36 | ) |
| 37 | yield |
| 38 | reset_tool_state() |
| 39 | |
| 40 | |
| 41 | # --------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected