Skip to content

Commit

Permalink
test max credits
Browse files Browse the repository at this point in the history
  • Loading branch information
jabdoa2 committed May 7, 2016
1 parent 00bdb4c commit 05bafd7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mpf/tests/test_CreditsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@ def testMorePlayers(self):
self.machine_run()
self.assertEqual("CREDITS 1", self.machine.get_machine_var('credits_string'))

def testMaxCredits(self):
self.assertTrue(self.machine.mode_controller.is_active('credits'))
self.assertEqual("CREDITS 0", self.machine.get_machine_var('credits_string'))

self.hit_and_release_switch("s_right_coin")
self.hit_and_release_switch("s_right_coin")
self.hit_and_release_switch("s_right_coin")
self.hit_and_release_switch("s_right_coin")
self.machine_run()

self.assertEqual("CREDITS 10", self.machine.get_machine_var('credits_string'))

self.hit_and_release_switch("s_right_coin")
self.machine_run()
self.assertEqual("CREDITS 12", self.machine.get_machine_var('credits_string'))

self.hit_and_release_switch("s_right_coin")
self.machine_run()
self.assertEqual("CREDITS 12", self.machine.get_machine_var('credits_string'))

def testPricingTiers(self):
self.hit_and_release_switch("s_right_coin")
self.machine_run()
Expand Down

0 comments on commit 05bafd7

Please sign in to comment.