Test logs
This commit is contained in:
@ -256,6 +256,18 @@ class TestGame(unittest.TestCase):
|
||||
self.game.handle_key_pressed(KeyValues.ENTER)
|
||||
self.assertEqual(self.game.state, GameMode.MAINMENU)
|
||||
|
||||
def test_logs(self) -> None:
|
||||
"""
|
||||
Tests the use of logs
|
||||
"""
|
||||
self.game.logs.add_message("Hello World !")
|
||||
self.assertEqual(self.game.logs.messages, ["Hello World !"])
|
||||
self.game.logs.add_messages(["Hello", "World"])
|
||||
self.assertEqual(self.game.logs.messages, ["Hello World !",
|
||||
"Hello", "World"])
|
||||
self.game.logs.clear()
|
||||
self.assertEqual(self.game.logs.messages, [])
|
||||
|
||||
def test_dead_screen(self) -> None:
|
||||
"""
|
||||
Kill player and render dead screen.
|
||||
|
Reference in New Issue
Block a user