mirror of
https://github.com/Paillat-dev/esc-dramatic-unpause.git
synced 2026-01-02 01:06:21 +00:00
🐛 Fix "rest of the world" introduced in 2023
This commit is contained in:
@@ -22,6 +22,9 @@ DATASET_PATH = DATASET_BASE / "senior"
|
||||
|
||||
YEARS_TO_TEST = list(range(2016, 2026))
|
||||
|
||||
# Rest of world televote was introduced in Eurovision 2023
|
||||
REST_OF_WORLD_VOTE_YEAR = 2023
|
||||
|
||||
|
||||
class ESCData(TypedDict):
|
||||
"""TypedDict for ESC data."""
|
||||
@@ -161,10 +164,17 @@ def test_esc_grand_final(year: int, data: ESCData) -> None:
|
||||
inputs.append(str(televote_scores[country])) # noqa: PERF401
|
||||
inputs.append("y") # to confirm the winner
|
||||
|
||||
# Determine if rest of world vote should be included based on the year
|
||||
rest_of_world_vote = year >= REST_OF_WORLD_VOTE_YEAR
|
||||
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(
|
||||
app,
|
||||
["--jury-path", f.name, "--participating-countries", str(participating_countries)],
|
||||
[
|
||||
"--jury-path", f.name,
|
||||
"--participating-countries", str(participating_countries),
|
||||
"--rest-of-world-vote" if rest_of_world_vote else "--no-rest-of-world-vote",
|
||||
],
|
||||
input="\n".join(inputs),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user