From 984b12421bd4f09ce48948bcfb363b22e0915f61 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Thu, 19 Nov 2020 20:14:47 +0100 Subject: [PATCH] Reaching 100% coverage and renamed an unused loop variable --- squirrelbattle/tests/entities_test.py | 2 +- squirrelbattle/tests/game_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/squirrelbattle/tests/entities_test.py b/squirrelbattle/tests/entities_test.py index 2c4b5d6..0c8ee3c 100644 --- a/squirrelbattle/tests/entities_test.py +++ b/squirrelbattle/tests/entities_test.py @@ -161,7 +161,7 @@ class TestEntities(unittest.TestCase): self.assertFalse(player.move_up()) self.assertTrue(player.move_left()) self.assertFalse(player.move_left()) - for i in range(8): + for _ in range(8): self.assertTrue(player.move_down()) self.assertFalse(player.move_down()) self.assertTrue(player.move_right()) diff --git a/squirrelbattle/tests/game_test.py b/squirrelbattle/tests/game_test.py index f29a443..61c6c8e 100644 --- a/squirrelbattle/tests/game_test.py +++ b/squirrelbattle/tests/game_test.py @@ -17,6 +17,7 @@ class TestGame(unittest.TestCase): """ self.game = Game() self.game.new_game() + self.game.logs.add_message("Hello World !") display = DisplayManager(None, self.game) self.game.display_actions = display.handle_display_action @@ -260,7 +261,6 @@ class TestGame(unittest.TestCase): """ 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 !",