Skip to content

Commit

Permalink
UT: Fix tests for MaliciousPlayers (local games *can* have malicious …
Browse files Browse the repository at this point in the history
…Players now)
  • Loading branch information
Debilski committed Jun 16, 2012
1 parent 36bcf0e commit 099e8f4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_game_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,11 @@ def get_move(self):
test_self = self
class TestMaliciousPlayer(AbstractPlayer):
def get_move(self):
# universe should not have been altered
test_self.assertEqual(original_universe, gm.universe)
print id(original_universe.maze)
print id(gm.universe.maze)
# universe should have been altered because the
# Player is really malicious
test_self.assertNotEqual(original_universe, gm.universe)
return (0,0)

gm.register_team(SimpleTeam(MaliciousPlayer()))
Expand All @@ -325,7 +328,7 @@ def get_move(self):
gm.set_initial()
gm.play_round()

test_self.assertEqual(original_universe, gm.universe)
test_self.assertNotEqual(original_universe, gm.universe)


def test_viewer_may_change_gm(self):
Expand Down

0 comments on commit 099e8f4

Please sign in to comment.