Skip to content

Commit 5fdbfa3

Browse files
committed
test: add Persephone as map with odd expansion count
1 parent b662af7 commit 5fdbfa3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/generate_pickle_files_bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,13 @@ def main():
175175
"OxideAIE",
176176
"PaladinoTerminalLE",
177177
"ParaSiteLE",
178+
"PersephoneAIE",
178179
"PillarsofGold506",
179180
"PillarsofGoldLE",
180181
"PortAleksanderLE",
181182
"PrimusQ9",
182183
"ProximaStationLE",
184+
"PylonAIE",
183185
"RedshiftLE",
184186
"Reminiscence",
185187
"RomanticideAIE",
@@ -193,6 +195,7 @@ def main():
193195
"StasisLE",
194196
"TheTimelessVoid",
195197
"ThunderbirdLE",
198+
"TorchesAIE",
196199
"Treachery",
197200
"Triton",
198201
"Urzagol",

test/test_pickled_ramp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from loguru import logger
1515

1616
from sc2.game_info import Ramp
17+
from sc2.ids.unit_typeid import UnitTypeId
1718
from sc2.position import Point2
1819
from sc2.unit import Unit
1920
from sc2.units import Units
@@ -36,6 +37,8 @@ class TestClass:
3637
# Load all pickle files and convert them into bot objects from raw data (game_data, game_info, game_state)
3738
scenarios = [(map_path.name, {"map_path": map_path}) for map_path in MAPS]
3839

40+
MAPS_WITH_ODD_EXPANSION_COUNT: set[UnitTypeId] = {"Persephone AIE", "StargazersAIE", "Stasis LE"}
41+
3942
def test_main_base_ramp(self, map_path: Path):
4043
bot = get_map_specific_bot(map_path)
4144
# pyre-ignore[16]
@@ -105,7 +108,7 @@ def test_bot_ai(self, map_path: Path):
105108
# On N player maps, it is expected that there are N*X bases because of symmetry, at least for maps designed for 1vs1
106109
# Those maps in the list have an un-even expansion count
107110
# pyre-ignore[16]
108-
expect_even_expansion_count = 1 if bot.game_info.map_name in ["StargazersAIE", "Stasis LE"] else 0
111+
expect_even_expansion_count = 1 if bot.game_info.map_name in self.MAPS_WITH_ODD_EXPANSION_COUNT else 0
109112
assert (
110113
len(bot.expansion_locations_list) % (len(bot.enemy_start_locations) + 1) == expect_even_expansion_count
111114
), f"{bot.expansion_locations_list}"

0 commit comments

Comments
 (0)