Commit 2aa670bf authored by Théo BOUTEMY's avatar Théo BOUTEMY
Browse files

tests unitaires

parent 221373f7
import unittest
import math
import numpy as np
import table_de_jeu as t
import pieces as p
from joueur import *
......@@ -50,7 +48,17 @@ class TestPlateau(unittest.TestCase):
self.assertEqual(table_jeu2.xmax, 9)
self.assertEqual(table_jeu2.ymax, 6)
self.assertEqual(table_jeu2.nb_montagne, 5)
# self.assertIsInstance(table_jeu1.initialiserPlateau().ele, np.ndarray)
class TestAnimal(unittest.TestCase):
def test_sortir(self):
plateau = t.Plateau(xmax=5, ymax=5, nb_montagne=3, joueur1=Theo, joueur2=Pauline)
elephant = p.Elephant(4, 3, 'h', plateau)
rhinoceros=p.Rhinoceros(4, 3, 'h', plateau)
self.assertEqual(elephant.coords[0], 6)
self.assertEqual(rhinoceros.coords[0], -2)
# def test_initialiserPlateau(self):
# 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