We can open an empty inventory!

This commit is contained in:
Yohann D'ANELLO
2020-12-04 14:41:59 +01:00
parent 268e2d0dd2
commit 39af791012
12 changed files with 99 additions and 67 deletions

View File

@ -266,6 +266,7 @@ class TestGame(unittest.TestCase):
self.game.handle_key_pressed(KeyValues.DOWN)
self.game.handle_key_pressed(KeyValues.DOWN)
self.game.handle_key_pressed(KeyValues.DOWN)
self.game.handle_key_pressed(KeyValues.DOWN)
# Change texture pack
self.assertEqual(self.game.settings.TEXTURE_PACK, "ascii")

View File

@ -4,9 +4,13 @@
import unittest
from squirrelbattle.settings import Settings
from squirrelbattle.translations import Translator
class TestSettings(unittest.TestCase):
def setUp(self) -> None:
Translator.setlocale("en")
def test_settings(self) -> None:
"""
Ensure that settings are well loaded.

View File

@ -42,6 +42,8 @@ class TestTranslations(unittest.TestCase):
"Touche secondaire pour aller vers la droite")
self.assertEqual(_("Key to validate a menu"),
"Touche pour valider un menu")
self.assertEqual(_("Key used to open the inventory"),
"Touche utilisée pour ouvrir l'inventaire")
self.assertEqual(_("Texture pack"), "Pack de textures")
self.assertEqual(_("Language"), "Langue")