def test_claim_slot_on_partially_filled_days(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(4, 4.5), 0) my_slot, containing_slot_index = timeline.find_slot(4.1, 0.5) self.assertEqual(Slot(4.5, 5), my_slot) return
def test_claim_slot(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(4, 4.5), 0) self.assertEqual([Slot(0, 4), Slot(4.5, float('inf'))], timeline.slots) return
def test_find_slot_at_end(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(0, 1.0), 0) my_slot, containing_slot_index = timeline.find_slot(0, 1.0) return
def test_claim_slot_on_partially_filled_days(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(4, 4.5), 0) my_slot, containing_slot_index = timeline.find_slot(4.1, 0.5) self.assertEqual(Slot(4.5, 5), my_slot) return
def test_claim_slot(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(4, 4.5), 0) self.assertEqual([Slot(0, 4), Slot(4.5, float('inf'))], timeline.slots) return
def test_find_slot_at_end(self): timeline = Timeline(util.nov1) timeline.claim_slot(Slot(0, 1.0), 0) my_slot, containing_slot_index = timeline.find_slot(0, 1.0) return