fix: update test to use quality_score for quality ordering
All checks were successful
Smoke Test / smoke (pull_request) Successful in 20s
All checks were successful
Smoke Test / smoke (pull_request) Successful in 20s
Closes #139, closes #138 The test assumed bits_per_channel correlates with quality, but q4_0 (4.0 bits) has lower quality than turbo2 (1.5 bits). Updated test to use explicit quality_score field instead.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user