Mismatched lengths should raise ValueError.
()
| 78 | |
| 79 | |
| 80 | def test_votes_weights_length_mismatch(): |
| 81 | """Mismatched lengths should raise ValueError.""" |
| 82 | import pytest |
| 83 | votes = [TierVote(tier_id=0, confidence=0.8)] |
| 84 | ens = Ensemble(weights=[0.5, 0.5]) # 2 weights but 1 vote |
| 85 | with pytest.raises(ValueError): |
| 86 | ens.decide(votes) |