File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -103,17 +103,29 @@ def test_private_category():
103103 # TODO: library should probably provide helper functions and/or constants to check this
104104 assert replay .category == "Private"
105105
106- def test_3v3_type ():
106+ def test_3v3 ():
107107 replay = Replay ("test_replays/build17811/3.sc2replay" )
108108
109109 assert replay .type == "3v3"
110- assert len (replay .messages ) == 25
110+
111+ # Team 1 is the winner because all members of the other team quit
112+ assert replay .results [1 ] == "Won"
113+ assert replay .results [2 ] == "Lost"
114+
115+
116+ def test_random_player ():
117+ replay = Replay ("test_replays/build17811/3.sc2replay" )
111118
119+ gogeta = find (lambda player : player .name == "Gogeta" , replay .players )
120+ assert gogeta .choosen_race == "Random"
121+ assert gogeta .actual_race == "Terran"
122+
112123def test_us_realm ():
113124 replay = Replay ("test_replays/build17811/4.sc2replay" )
114125 lalush = find (lambda player : player .name == "lalush" , replay .players )
115126 avilo = find (lambda player : player .name == "avilo" , replay .players )
116127
117128 assert lalush .url == "http://us.battle.net/sc2/en/profile/2396588/1/lalush/"
118129 assert avilo .url == "http://us.battle.net/sc2/en/profile/327563/1/avilo/"
119- # TODO: Test 2v2, 4v4 and FFA
130+
131+ #TODO: Test 2v2, 4v4 and FFA
You can’t perform that action at this time.
0 commit comments