-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_des_classe.py
56 lines (42 loc) · 1.48 KB
/
test_des_classe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding: utf-8 -*-
import unittest
import Circuit as c
import VehiculeIAA as v
import VehiculeIAB as vb
class TestVehiculeIAA(unittest.TestCase):
def test_var(self):
cir=c.Circuit("circuit9.txt",0,2,10)
x,y=cir.coordonneesWayPoint(1)
ve=v.VehiculeIAA(x,y,cir,5)
self.assertEqual(ve.x,x)
self.assertEqual(ve.coords, (x,y))
def test_type(self):
cir=c.Circuit("circuit9.txt",2,3)
x,y=cir.coordonneesWayPoint(1)
ve=v.VehiculeIAA(x,y,cir,5)
self.assertIsInstance(ve,v.VehiculeIAA)
class TestVehiculeIAb(unittest.TestCase):
def test_var(self):
cir=c.Circuit("circuit9.txt",2,3)
x,y=cir.coordonneesWayPoint(1)
ve=vb.VehiculeIAB(x,y,cir,5)
self.assertEqual(ve.x,x)
self.assertEqual(ve.coords, (x,y))
class TestVehiculeIAc(unittest.TestCase):
def test_var(self):
cir=c.Circuit("circuit9.txt",2,3)
x,y=cir.coordonneesWayPoint(1)
ve=vb.VehiculeIAC(x,y,cir,5)
self.assertEqual(ve.x,x)
self.assertEqual(ve.coords, (x,y))
def test_type(self):
cir=c.Circuit("circuit9.txt",0,2,10)
x,y=cir.coordonneesWayPoint(1)
ve=vb.VehiculeIAB(x,y,cir,5)
self.assertIsInstance(ve,vb.VehiculeIAB)
class TestCircuit(unittest.TestCase):
def test_type(self):
cir=c.Circuit("circuit9.txt",0,2,10)
self.assertIsInstance(cir, list)
if __name__ == '__main__':
unittest.main()