Skip to content

Commit d8fa276

Browse files
committed
Test for LotV apm fix.
1 parent 604e629 commit d8fa276

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test_replays/test_all.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,17 @@ def test_lotv_time(self):
494494
self.assertEqual(replay.length.seconds, 1002)
495495
self.assertEqual(replay.real_length.seconds, 1002)
496496

497+
def test_lotv_apm(self):
498+
from sc2reader.factories.plugins.replay import APMTracker, SelectionTracker, toJSON
499+
factory = sc2reader.factories.SC2Factory()
500+
factory.register_plugin("Replay", APMTracker())
501+
replay = factory.load_replay("test_replays/lotv/lotv1.SC2Replay")
502+
for player in replay.players:
503+
from pprint import pprint
504+
pprint(player)
505+
if player.name == 'Zenchii':
506+
self.assertTrue(int(player.avg_apm) == 56)
507+
497508

498509
class TestGameEngine(unittest.TestCase):
499510
class TestEvent(object):

0 commit comments

Comments
 (0)