diff --git a/gauntlets.py b/gauntlets.py index 9b8beb6..4ceeeb1 100644 --- a/gauntlets.py +++ b/gauntlets.py @@ -2472,7 +2472,13 @@ def build_gauntlet_recap_embed( if loss_max is not None else wins >= win_num ) - marker = "✅" if earned else "❌" if losses > (loss_max or 99) else "⬜" + marker = ( + "✅" + if earned + else "❌" + if losses > (loss_max if loss_max is not None else 99) + else "⬜" + ) reward = r.get("reward", {}) if reward.get("money"): diff --git a/tests/test_gauntlet_recap.py b/tests/test_gauntlet_recap.py index de5daa0..0324440 100644 --- a/tests/test_gauntlet_recap.py +++ b/tests/test_gauntlet_recap.py @@ -204,11 +204,11 @@ class TestBuildGauntletRecapEmbed: make_run(wins=10, losses=1), make_event(), make_main_team(), make_rewards() ) prize_field = next(f for f in embed.fields if f.name == "Prize Distribution") - # The 10-0 bonus line must appear without ✅ (either ❌ or ⬜) + # The 10-0 bonus line must be marked ❌ — ineligible, not pending (⬜) lines = prize_field.value.split("\n") bonus_line = next((line for line in lines if "10-0" in line), None) assert bonus_line is not None, "Expected a '10-0' line in prizes" - assert "✅" not in bonus_line + assert "❌" in bonus_line def test_empty_rewards_list_omits_prize_field(self): """When rewards is an empty list the Prize Distribution field must be omitted.