MCPcopy Index your code
hub / github.com/LLMQuant/quant-mind / test_happy_path

Method test_happy_path

tests/flows/test_batch.py:30–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28
29class BatchRunTests(unittest.IsolatedAsyncioTestCase):
30 async def test_happy_path(self) -> None:
31 async def flow(input: RawText, *, cfg: Any = None) -> str:
32 return f"ok:{input.text}"
33
34 inputs = [RawText(text=str(i)) for i in range(5)]
35 result = await batch_run(flow, inputs, concurrency=3)
36 self.assertEqual(result.total, 5)
37 self.assertEqual(result.success_count, 5)
38 self.assertEqual(result.failure_count, 0)
39 self.assertEqual(result.results, [f"ok:{i}" for i in range(5)])
40 self.assertEqual(result.errors, [])
41 self.assertGreaterEqual(result.duration_seconds, 0)
42 self.assertEqual(result.tokens_total, {})
43 self.assertEqual(result.cost_estimate_usd, 0.0)
44
45 async def test_empty_inputs(self) -> None:
46 async def flow(input: RawText, *, cfg: Any = None) -> str:

Callers

nothing calls this directly

Calls 2

RawTextClass · 0.90
batch_runFunction · 0.90

Tested by

no test coverage detected