Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Théo BOUTEMY
siam
Commits
2aa670bf
Commit
2aa670bf
authored
May 25, 2021
by
Théo BOUTEMY
Browse files
tests unitaires
parent
221373f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.py
View file @
2aa670bf
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
)
elephant
.
sortir
()
rhinoceros
.
sortir
()
self
.
assertEqual
(
elephant
.
coords
[
0
],
6
)
self
.
assertEqual
(
rhinoceros
.
coords
[
0
],
-
2
)
# def test_initialiserPlateau(self):
# for k in range(1, 4):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment