-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.py
executable file
·60 lines (40 loc) · 929 Bytes
/
tests.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
57
58
59
60
from shifts_scheduler import *
##### TEST 1 ######
pop = Population()
# final_schedule = Times(0, 10)
# times = Times(0, 10)
amelia = Person("Amelia", 2)
amelia.add_group(0, 3)
amelia.add_group(5, 6)
jay = Person("Jay", 3)
jay.add_group(2, 8)
alex = Person("Alex", 2)
alex.add_group(6, 10)
frances = Person("Frances", 2)
frances.add_group(1, 3)
frances.add_group(8, 10)
shona = Person("Shona", 1)
shona.add_group(5, 7)
pop.add_person([amelia,jay,alex,frances,shona])
for person in pop.people:
person.set_score()
pop.sort()
##### TEST 2 ######
pop = Population()
# final_schedule = Times(0, 10)
# times = Times(0, 10)
a = Person("A", 4)
a.add_group(1, 9)
b = Person("B", 2)
b.add_group(4, 8)
c = Person("C", 2)
c.add_group(1, 3)
c.add_group(8, 10)
d = Person("D", 1)
d.add_group(1, 3)
e = Person("E", 1)
e.add_group(8, 10)
pop.add_person([a,b,c,d,e])
for person in pop.people:
person.set_score()
pop.sort()