File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,18 @@ 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+ print ("Zenchii apm:" ,player .avg_apm )
507+ self .assertTrue (int (player .avg_apm ) == 56 )
508+
497509
498510class TestGameEngine (unittest .TestCase ):
499511 class TestEvent (object ):
You can’t perform that action at this time.
0 commit comments