Exemplo n.º 1
0
 def test_empty(self):
     calendar = Calendar([])
     calendar.optimize()
     self.assertEqual(calendar.output_list, [])
Exemplo n.º 2
0
 def test_optimize(self):
     test_list = [(0, 1), (3, 5), (4, 8), (10, 12), (9, 10)]
     calendar = Calendar(test_list)
     calendar.optimize()
     self.assertEqual(calendar.output_list, [(0, 1), (3, 8), (9, 12)])
Exemplo n.º 3
0
from Calendar import Calendar

calendar = Calendar([(0, 1), (3, 5), (4, 8), (10, 12), (9, 11)])
calendar.optimize()
print(calendar.output_list)