Logs are capitalized

This commit is contained in:
Yohann D'ANELLO 2020-11-28 01:25:35 +01:00
parent 70ae60b9a4
commit 138b2c6d54
1 changed files with 5 additions and 5 deletions

View File

@ -46,10 +46,10 @@ class TestEntities(unittest.TestCase):
self.assertEqual(entity.strength, 2)
for _ in range(9):
self.assertEqual(entity.hit(entity),
"tiger hits tiger. tiger takes 2 damage.")
"Tiger hits tiger. Tiger takes 2 damage.")
self.assertFalse(entity.dead)
self.assertEqual(entity.hit(entity), "tiger hits tiger. "
+ "tiger takes 2 damage. tiger dies.")
self.assertEqual(entity.hit(entity), "Tiger hits tiger. "
+ "Tiger takes 2 damage. Tiger dies.")
self.assertTrue(entity.dead)
entity = Rabbit()
@ -70,8 +70,8 @@ class TestEntities(unittest.TestCase):
self.assertTrue(entity.y == 2 and entity.x == 6)
self.assertEqual(old_health - entity.strength, self.player.health)
self.assertEqual(self.map.logs.messages[-1],
f"{entity.name} hits {self.player.name}. \
{self.player.name} takes {entity.strength} damage.")
f"{entity.name.capitalize()} hits {self.player.name}. \
{self.player.name.capitalize()} takes {entity.strength} damage.")
# Fight the rabbit
old_health = entity.health