diff --git a/app/playoff.py b/app/playoff.py index c4db214..18e9193 100644 --- a/app/playoff.py +++ b/app/playoff.py @@ -119,18 +119,18 @@ def series_blurb(game): # the next matchup \u2014 fall through to a generic series-score blurb instead. if not is_final: if state["is_game7"]: - return "Win-or-go-home \u2014 Game 7." + return "Win-or-go-home." if state["is_clincher"] and leader_name: - return f"{leader_name} can close it out \u2014 Game {g}." + return f"{leader_name} can close it out." if state["is_pivotal"]: - return f"Series tied 2\u20112 \u2014 pivotal Game {g}." + return "Series tied 2\u20112 \u2014 pivotal." if state["is_opener"]: return "Series opener" if leader_name and trailer_name: return f"{leader_name} lead {state['hi']}\u2011{state['lo']}" if state["hi"] == state["lo"]: - return f"Series even at {state['hi']}\u2011{state['lo']} \u2014 Game {g}." - return f"Game {g}." + return f"Series even at {state['hi']}\u2011{state['lo']}." + return "" def series_badges(game): diff --git a/tests/test_playoff_series.py b/tests/test_playoff_series.py index b467bec..71d4a8e 100644 --- a/tests/test_playoff_series.py +++ b/tests/test_playoff_series.py @@ -73,7 +73,7 @@ class TestSeriesBlurb: def test_game7_blurb(self): game = make_playoff_game(top_wins=3, bottom_wins=3) - assert series_blurb(game) == "Win-or-go-home \u2014 Game 7." + assert series_blurb(game) == "Win-or-go-home." def test_clincher_blurb_names_leader(self): game = make_playoff_game( @@ -86,12 +86,10 @@ class TestSeriesBlurb: blurb = series_blurb(game) assert "Top Seeds" in blurb assert "close it out" in blurb - assert "Game 5" in blurb def test_pivotal_blurb(self): game = make_playoff_game(top_wins=2, bottom_wins=2) assert "pivotal" in series_blurb(game).lower() - assert "Game 5" in series_blurb(game) def test_leader_trailer_blurb(self): game = make_playoff_game(top_wins=2, bottom_wins=1) @@ -102,8 +100,7 @@ class TestSeriesBlurb: def test_tied_mid_series_blurb(self): game = make_playoff_game(top_wins=1, bottom_wins=1) blurb = series_blurb(game) - assert "1" in blurb - assert "Game 3" in blurb + assert "1‑1" in blurb def test_final_clincher_falls_through_to_leader_blurb(self): # Post-game seriesStatus (3-0) would trigger the clincher branch, but