Skip to content

Commit a403034

Browse files
author
Dominik Neise
committed
use a different replay for some lotv tests:
- make sure there is really a zerg in that replay, otherwise the test would test nothing at all - remove outdated comment, that test does not fail.
1 parent 0f3726f commit a403034

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test_replays/test_all.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,19 +435,21 @@ def test_lotv1(self):
435435
def test_lotv_creepTracker(self):
436436
from sc2reader.engine.plugins import CreepTracker
437437

438-
for replayfilename in ["test_replays/lotv/lotv1.SC2Replay"]:
438+
for replayfilename in ["test_replays/4.0.0.59587/1.SC2Replay"]:
439439
factory = sc2reader.factories.SC2Factory()
440440
pluginEngine = sc2reader.engine.GameEngine(plugins=[CreepTracker()])
441441
replay = factory.load_replay(replayfilename, engine=pluginEngine, load_map=True)
442442

443+
is_at_least_one_zerg_in_game = False
443444
for player_id in replay.player:
444445
if replay.player[player_id].play_race == "Zerg":
446+
is_at_least_one_zerg_in_game = True
445447
assert replay.player[player_id].max_creep_spread != 0
446448
assert replay.player[player_id].creep_spread_by_minute
449+
assert is_at_least_one_zerg_in_game
447450

448451
def test_lotv_map(self):
449-
# This test currently fails in decoders.py with 'TypeError: ord() expected a character, but string of length 0 found'
450-
for replayfilename in ["test_replays/lotv/lotv1.SC2Replay"]:
452+
for replayfilename in ["test_replays/4.0.0.59587/1.SC2Replay"]:
451453
factory = sc2reader.factories.SC2Factory()
452454
replay = factory.load_replay(replayfilename, load_level=1, load_map=True)
453455

0 commit comments

Comments
 (0)