Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StoicLoofah committed Feb 14, 2023
1 parent 59e25ea commit dd30c0b
Show file tree
Hide file tree
Showing 7 changed files with 38,140 additions and 33,070 deletions.
15 changes: 15 additions & 0 deletions tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def assertObjectsEqual(self, results, expected_results, path):
def _test_replay(self, filename, expected_results_filename):
results = spawningtool.parser.parse_replay("replays/{}".format(filename))
with open('tests/{}'.format(expected_results_filename), 'r') as expected_results_file:
# json.dump(results, expected_results_file, indent=4)
expected_results = json.load(expected_results_file)

self.assertDictsEqual(results, expected_results)
Expand Down Expand Up @@ -92,6 +93,20 @@ def test_coop(self):
self._test_replay('kerrigan.SC2Replay',
'kerrigan.json')

def test_patch_400(self):
"""
Test 4.0.0 patch
"""
self._test_replay('patch_400.SC2Replay',
'patch_400.json')

def test_patch_5_0_11(self):
"""
Test 5.0.11 patch
"""
self._test_replay('patch_5_0_11.SC2Replay',
'patch_5_0_11.json')


if __name__ == '__main__':
unittest.main()
Loading

0 comments on commit dd30c0b

Please sign in to comment.