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):
494
494
self .assertEqual (replay .length .seconds , 1002 )
495
495
self .assertEqual (replay .real_length .seconds , 1002 )
496
496
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
+
497
509
498
510
class TestGameEngine (unittest .TestCase ):
499
511
class TestEvent (object ):
You can’t perform that action at this time.
0 commit comments