@@ -18,7 +18,7 @@ def test_empty():
1818
1919# Tests for build 17811 replays
2020
21- def test_1 ():
21+ def test_standard_1v1 ():
2222 replay = Replay ("test_replays/build17811/1.sc2replay" )
2323
2424# assert replay.date == "20 Feb 2011 22:44:48"
@@ -106,16 +106,24 @@ def test_3v3():
106106 assert replay .results [1 ] == "Won"
107107 assert replay .results [2 ] == "Lost"
108108
109+ def test_4v4 ():
110+ # Source: http://drop.sc/32
111+ replay = Replay ("test_replays/build17811/9.sc2replay" )
112+ assert replay .type == "4v4"
113+
114+ def test_ffa ():
115+ # Source: http://drop.sc/83
116+ replay = Replay ("test_replays/build17811/8.sc2replay" )
117+ assert replay .type == "FFA"
118+ assert replay .player ['Boom' ].result = "Won"
109119
110120def test_random_player ():
111121 replay = Replay ("test_replays/build17811/3.sc2replay" )
112122
113123 gogeta = replay .player ['Gogeta' ]
114124 assert gogeta .choosen_race == "Random"
115125 assert gogeta .actual_race == "Terran"
116-
117- # Ha! This was actually failing with phpsc2replay! (Didn't produce the right Random race)
118- # Hooray, major milestone as phpsc2replay isn't a superset of sc2readera anymore!
126+
119127def test_random_player2 ():
120128 replay = Replay ("test_replays/build17811/6.sc2replay" )
121129 permafrost = replay .player ["Permafrost" ]
@@ -132,4 +140,4 @@ def test_us_realm():
132140def test_encrypted ():
133141 replay = Replay ("test_replays/build17811/4.sc2replay" )
134142
135- #TODO: Test 2v2, 4v4 and FFA
143+ # TODO: Test with a 2v2, 3v3 or 4v4 replay, where the recording player quits first (should be marked as unknown)
0 commit comments