Commit 1c642e25 authored by Théo BOUTEMY's avatar Théo BOUTEMY
Browse files

tests unitaires

parent 2aa670bf
...@@ -59,6 +59,19 @@ class TestAnimal(unittest.TestCase): ...@@ -59,6 +59,19 @@ class TestAnimal(unittest.TestCase):
self.assertEqual(elephant.coords[0], 6) self.assertEqual(elephant.coords[0], 6)
self.assertEqual(rhinoceros.coords[0], -2) self.assertEqual(rhinoceros.coords[0], -2)
def test_pousser(self):
plateau = t.Plateau(xmax=5, ymax=5, nb_montagne=3, joueur1=Theo, joueur2=Pauline)
elephant1 = p.Elephant(4, 3, 'h', plateau)
elephant2 = p.Elephant(4, 2, 'g', plateau)
elephant1.pousser()
elephant2.pousser()
self.assertEqual(elephant2.coords, (3, 2))
self.assertEqual(elephant1.coords, (4, 2))
# def test_initialiserPlateau(self): # def test_initialiserPlateau(self):
# for k in range(1, 4): # for k in range(1, 4):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment