diff --git a/tests/test_report.py b/tests/test_report.py index 0feffb6..23afdb4 100644 --- a/tests/test_report.py +++ b/tests/test_report.py @@ -192,3 +192,53 @@ def test_generate_html_report_escapes_all_llm_payloads(tmp_path: Path): # Format-Redline-Marker müssen weiterhin funktionieren (Vorschlag mit **) assert '' in html + + +# ─── Coverage-Backfill (#134) ──────────────────────────────────────────────── + + +class TestGetScoreColor: + def test_high_score_blue(self): + from app.report import get_score_color + assert get_score_color(8.5).lower().startswith("#") + assert get_score_color(8.5) == get_score_color(7.0) # gleiche Klasse + + def test_mid_score_green(self): + from app.report import get_score_color, COLORS + assert get_score_color(5.0) == COLORS["green"] + + def test_low_yellow(self): + from app.report import get_score_color + assert get_score_color(2.5) == "#FFC20E" + + def test_very_low_orange(self): + from app.report import get_score_color, COLORS + assert get_score_color(1.5) == COLORS["orange"] + + def test_zero_red(self): + from app.report import get_score_color, COLORS + assert get_score_color(0.0) == COLORS["red"] + + +class TestGetRatingSymbol: + def test_strong_positive(self): + from app.report import get_rating_symbol + assert get_rating_symbol(2) == "++" + assert get_rating_symbol(5) == "++" + + def test_positive(self): + from app.report import get_rating_symbol + assert get_rating_symbol(1) == "+" + + def test_neutral(self): + from app.report import get_rating_symbol + assert get_rating_symbol(0) == "○" + + def test_negative(self): + from app.report import get_rating_symbol + assert get_rating_symbol(-1) == "−" + + def test_strong_negative(self): + from app.report import get_rating_symbol + assert get_rating_symbol(-2) == "−−" + assert get_rating_symbol(-5) == "−−"