Logs are capitalized
This commit is contained in:
parent
70ae60b9a4
commit
138b2c6d54
|
@ -46,10 +46,10 @@ class TestEntities(unittest.TestCase):
|
||||||
self.assertEqual(entity.strength, 2)
|
self.assertEqual(entity.strength, 2)
|
||||||
for _ in range(9):
|
for _ in range(9):
|
||||||
self.assertEqual(entity.hit(entity),
|
self.assertEqual(entity.hit(entity),
|
||||||
"tiger hits tiger. tiger takes 2 damage.")
|
"Tiger hits tiger. Tiger takes 2 damage.")
|
||||||
self.assertFalse(entity.dead)
|
self.assertFalse(entity.dead)
|
||||||
self.assertEqual(entity.hit(entity), "tiger hits tiger. "
|
self.assertEqual(entity.hit(entity), "Tiger hits tiger. "
|
||||||
+ "tiger takes 2 damage. tiger dies.")
|
+ "Tiger takes 2 damage. Tiger dies.")
|
||||||
self.assertTrue(entity.dead)
|
self.assertTrue(entity.dead)
|
||||||
|
|
||||||
entity = Rabbit()
|
entity = Rabbit()
|
||||||
|
@ -70,8 +70,8 @@ class TestEntities(unittest.TestCase):
|
||||||
self.assertTrue(entity.y == 2 and entity.x == 6)
|
self.assertTrue(entity.y == 2 and entity.x == 6)
|
||||||
self.assertEqual(old_health - entity.strength, self.player.health)
|
self.assertEqual(old_health - entity.strength, self.player.health)
|
||||||
self.assertEqual(self.map.logs.messages[-1],
|
self.assertEqual(self.map.logs.messages[-1],
|
||||||
f"{entity.name} hits {self.player.name}. \
|
f"{entity.name.capitalize()} hits {self.player.name}. \
|
||||||
{self.player.name} takes {entity.strength} damage.")
|
{self.player.name.capitalize()} takes {entity.strength} damage.")
|
||||||
|
|
||||||
# Fight the rabbit
|
# Fight the rabbit
|
||||||
old_health = entity.health
|
old_health = entity.health
|
||||||
|
|
Loading…
Reference in New Issue