MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_budget_ceiling_stops_the_run

Function test_budget_ceiling_stops_the_run

tests/workflow/test_runtime.py:127–138  ·  view source on GitHub ↗
(runner)

Source from the content-addressed store, hash-verified

125
126
127async def test_budget_ceiling_stops_the_run(runner):
128 # Each agent costs 5 tokens; total 8 -> the third call trips the ceiling.
129 script = META + (
130 'a = await agent("1")\n'
131 'b = await agent("2")\n'
132 'c = await agent("3")\n'
133 "return [a, b, c]\n"
134 )
135 res = await run_workflow(script, runner=runner, budget_total=8)
136 assert not res.ok
137 assert "budget" in res.error.lower()
138 assert runner.call_count == 2 # third never reached the runner
139
140
141async def test_per_call_item_cap(monkeypatch, runner):

Callers

nothing calls this directly

Calls 1

run_workflowFunction · 0.90

Tested by

no test coverage detected