Add saturation max slider to UI and image processing logic
This commit is contained in:
@@ -12,18 +12,18 @@ def test_stats_summary():
|
||||
matches_excl=10, total_excl=20
|
||||
)
|
||||
|
||||
# Mock translator
|
||||
def mock_t(key, **kwargs):
|
||||
if key == "stats.placeholder":
|
||||
return "Placeholder"
|
||||
return f"{kwargs['with_pct']:.1f} {kwargs['without_pct']:.1f} {kwargs['excluded_pct']:.1f} {kwargs['excluded_match_pct']:.1f}"
|
||||
if not kwargs:
|
||||
return key
|
||||
return f"{kwargs['with_pct']:.1f} {kwargs['without_pct']:.1f} {kwargs['excluded_pct']:.1f}"
|
||||
|
||||
res = s.summary(mock_t)
|
||||
# with_pct: 40/80 = 50.0
|
||||
# without_pct: 50/100 = 50.0
|
||||
# excluded_pct: 20/100 = 20.0
|
||||
# excluded_match_pct: 10/20 = 50.0
|
||||
assert res == "50.0 50.0 20.0 50.0"
|
||||
assert res == "50.0 50.0 20.0"
|
||||
|
||||
def test_stats_empty():
|
||||
s = Stats()
|
||||
|
||||
Reference in New Issue
Block a user