Skip to content

Commit b22a26a

Browse files
committed
new test that proves oracle parsing is working great
1 parent 4bd8eec commit b22a26a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

sc2reader/scripts/sc2parse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def main():
5656
print ' with {path}: {build} - {real_type} on {map_name} - Played {start_time}'.format(path=path, **replay.__dict__)
5757
else:
5858
print 'No problems with {path}: {build} - {real_type} on {map_name} - Played {start_time}'.format(path=path, **replay.__dict__)
59+
print 'Units were: {units}'.format(units=set([ obj.name for obj in replay.objects.values() ]))
5960

6061
except sc2reader.exceptions.ReadError as e:
6162
if args.ladder_only and not e.replay.is_ladder: continue
92.8 KB
Binary file not shown.

test_replays/test_all.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,8 @@ def test_hots_hatchfun():
213213
def test_hots_vs_ai():
214214
replay = sc2reader.load_replay("test_replays/2.0.0.24247/Cloud Kingdom LE (13).SC2Replay")
215215
replay = sc2reader.load_replay("test_replays/2.0.0.24247/Korhal City (19).SC2Replay")
216+
217+
def test_oracle_parsing():
218+
replay = sc2reader.load_replay("test_replays/2.0.3.24764/ggtracker_1571740.SC2Replay")
219+
oracles = [unit for unit in replay.objects.values() if unit.name=='Oracle']
220+
assert len(oracles) == 2

0 commit comments

Comments
 (0)