Test credits menu
This commit is contained in:
parent
4b174f26e4
commit
ed6457e94d
@ -585,3 +585,14 @@ class TestGame(unittest.TestCase):
|
||||
# Exit the menu
|
||||
self.game.handle_key_pressed(KeyValues.SPACE)
|
||||
self.assertEqual(self.game.state, GameMode.PLAY)
|
||||
|
||||
def test_credits(self) -> None:
|
||||
"""
|
||||
Load credits menu.
|
||||
"""
|
||||
self.game.state = GameMode.MAINMENU
|
||||
|
||||
self.game.display_actions(DisplayActions.MOUSE, 41, 41)
|
||||
self.assertEqual(self.game.state, GameMode.CREDITS)
|
||||
self.game.display_actions(DisplayActions.MOUSE, 21, 21)
|
||||
self.game.display_actions(DisplayActions.REFRESH)
|
||||
|
@ -24,3 +24,6 @@ class FakePad:
|
||||
|
||||
def getmaxyx(self) -> Tuple[int, int]:
|
||||
return 42, 42
|
||||
|
||||
def inch(self, y, x) -> str:
|
||||
return "i"
|
||||
|
Loading…
Reference in New Issue
Block a user