simplify the battle tests

This commit is contained in:
Bryan Bishop
2013-11-09 15:53:17 -06:00
parent 3868fb1e06
commit eb31936aa7

View File

@@ -39,13 +39,16 @@ class BattleTests(unittest.TestCase):
def setUp(self):
# reset to whatever the bootstrapper created
self.vba.state = self.bootstrap_state
self.battle = Battle(emulator=self.cry)
def test_battle_is_player_turn(self):
self.cry.vba.state = self.bootstrap_state
def test_is_in_battle(self):
self.assertTrue(self.battle.is_in_battle())
battle = Battle(emulator=self.cry)
def test_is_player_turn(self):
self.battle.skip_start_text()
self.assertTrue(battle.is_player_turn())
# the initial state should be the player's turn
self.assertTrue(self.battle.is_player_turn())
if __name__ == "__main__":
unittest.main()