Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/nba_api/stats/library/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6660,4 +6660,24 @@
"California",
[],
],
[
1611661327,
"POR",
"Fire",
2026,
"Portland",
"Portland Fire",
"Oregon",
[],
],
[
1611661332,
"TOR",
"Tempo",
2026,
"Toronto",
"Toronto Tempo",
"Ontario",
[],
],
]
29 changes: 28 additions & 1 deletion tests/unit/stats/static/test_static_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,31 @@ def test_nba_teams():


def test_wnba_teams():
assert len(teams.wnba_teams) == 13
assert len(teams.wnba_teams) == 15


def test_wnba_2026_expansion_teams_present():
"""Toronto Tempo and Portland Fire joined the WNBA as expansion franchises
for the 2026 season. Regression guard for https://github.com/swar/nba_api/issues/666."""
tempo = teams.find_wnba_team_by_abbreviation("TOR")
assert tempo is not None
assert tempo["id"] == 1611661332
assert tempo["full_name"] == "Toronto Tempo"
assert tempo["nickname"] == "Tempo"
assert tempo["city"] == "Toronto"
assert tempo["state"] == "Ontario"
assert tempo["year_founded"] == 2026

fire = teams.find_wnba_team_by_abbreviation("POR")
assert fire is not None
assert fire["id"] == 1611661327
assert fire["full_name"] == "Portland Fire"
assert fire["nickname"] == "Fire"
assert fire["city"] == "Portland"
assert fire["state"] == "Oregon"
assert fire["year_founded"] == 2026

# Inverse lookup: catches the case where the abbreviation index
# resolves but the id-keyed lookup falls out of sync.
assert teams.find_wnba_team_name_by_id(1611661332)["full_name"] == "Toronto Tempo"
assert teams.find_wnba_team_name_by_id(1611661327)["full_name"] == "Portland Fire"