コード例 #1
0
 def test_are_working_hours_contiguous_with_contiguous_working_hours(self):
     assert are_working_hours_contiguous([
         (time(hour=9), time(hour=12)),
         (time(hour=21), time(hour=0)),
     ], [
         (time(hour=0), time(hour=10)),
         (time(hour=21), time(hour=22)),
     ])
コード例 #2
0
 def test_are_working_hours_contiguous_with_separeted_working_hours(self):
     assert not are_working_hours_contiguous([
         (time(hour=9), time(hour=12)),
         (time(hour=21), time(hour=23)),
     ], [
         (time(hour=0), time(hour=10)),
         (time(hour=21), time(hour=22)),
     ])
     assert not are_working_hours_contiguous([
         (time(hour=9), time(hour=12)),
         (time(hour=21), time(hour=0)),
     ], [
         (time(hour=1), time(hour=10)),
         (time(hour=21), time(hour=22)),
     ])
     assert not are_working_hours_contiguous([
         (time(hour=9), time(hour=12)),
         (time(hour=21), time(hour=0)),
     ], [])
     assert not are_working_hours_contiguous([], [
         (time(hour=0), time(hour=10)),
         (time(hour=21), time(hour=22)),
     ])
     assert not are_working_hours_contiguous([], [])