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

Function test_conservative_bumps_tier_up

tests/test_ensemble.py:71–77  ·  view source on GitHub ↗

When confidence is low and best_tier < 3, conservative should bump +1.

()

Source from the content-addressed store, hash-verified

69
70
71def test_conservative_bumps_tier_up():
72 """When confidence is low and best_tier < 3, conservative should bump +1."""
73 votes = [TierVote(tier_id=1, confidence=0.8), TierVote(tier_id=0, confidence=0.7)]
74 ens = Ensemble(weights=[0.5, 0.5], risk_tolerance=0.0) # high threshold
75 result = ens.decide(votes)
76 assert result.method == "conservative", f"Expected conservative, got {result.method}"
77 assert result.tier_id == 2
78
79
80def test_votes_weights_length_mismatch():

Callers

nothing calls this directly

Calls 3

decideMethod · 0.95
TierVoteClass · 0.90
EnsembleClass · 0.90

Tested by

no test coverage detected