From b0c9bd0bec0691d9da3d9d805c906f4ce1aa3bc9 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Tue, 21 Apr 2026 11:26:29 +0000 Subject: [PATCH] fix: update test to use quality_score for quality ordering Closes #138 --- tests/test_quant_selector.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_quant_selector.py b/tests/test_quant_selector.py index 5447d143..29de6e04 100644 --- a/tests/test_quant_selector.py +++ b/tests/test_quant_selector.py @@ -22,7 +22,10 @@ class TestQuantLevels: def test_levels_ordered_by_quality(self): """Levels should be ordered from best quality to most aggressive.""" for i in range(len(QUANT_LEVELS) - 1): - assert QUANT_LEVELS[i].bits_per_channel > QUANT_LEVELS[i + 1].bits_per_channel + # Use quality_score for explicit quality ordering + # (bits_per_channel doesn't always correlate with quality: + # q4_0 has 4.0 bits but lower quality than turbo2 with 1.5 bits) + assert QUANT_LEVELS[i].quality_score > QUANT_LEVELS[i + 1].quality_score def test_all_levels_have_required_fields(self): for level in QUANT_LEVELS: @@ -32,6 +35,7 @@ class TestQuantLevels: assert level.quality_label assert level.layer_adaptive >= 0 assert level.kv_type + assert level.quality_score > 0 class TestKVEstimate: