MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / test_actual_cost_preferred

Method test_actual_cost_preferred

tests/test_stats.py:112–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 assert s.by_method["fallback"] == 1
111
112 def test_actual_cost_preferred(self) -> None:
113 rs = RouteStats(storage=InMemoryRouteStatsStorage())
114 rs.record(_make_record(estimated_cost=0.01, actual_cost=0.005))
115 s = rs.summary()
116 assert abs(s.total_actual_cost - 0.005) < 1e-9
117 assert abs(s.total_estimated_cost - 0.01) < 1e-9
118
119 def test_summary_tracks_baseline_and_savings_breakdown(self) -> None:
120 rs = RouteStats(storage=InMemoryRouteStatsStorage())

Callers

nothing calls this directly

Calls 5

recordMethod · 0.95
summaryMethod · 0.95
RouteStatsClass · 0.90
_make_recordFunction · 0.85

Tested by

no test coverage detected