예제 #1
0
 def test_ivl_compound_total_dur_other_schedule2(self):
     clnd = tb_10_8_6_hours()
     other_sdl = clnd.add_schedule('other', lambda x: x > -1)
     ivl = Interval(clnd, (2, 8), schedule=other_sdl)
     assert ivl.total_duration() == 58
     assert ivl.total_duration(duty='off') == 0
     assert ivl.total_duration(duty='any') == 58
예제 #2
0
 def test_ivl_compound_total_dur(self):
     clnd = tb_10_8_6_hours()
     ivl = Interval(clnd, (2, 8))
     assert ivl.total_duration() == 34
     assert ivl.total_duration(duty='off') == 24
     assert ivl.total_duration(duty='any') == 58