def test_greater_than_operator(self): e1 = Event(5.0, 6.0, 'Monday', 1) e2 = Event(6.0, 7.0, 'Tuesday', 1) assert(e2 > e1) assert(not(e1 > e2)) e2.start_time = 5.0 assert(not(e2 > e1)) assert(not(e1 > e2))
def test_less_than_operator(self): e1 = Event(5.0, 6.0, 'Monday', 1) e2 = Event(6.0, 7.0, 'Tuesday', 1) assert(not(e2 < e1)) assert(e1 < e2) e2.start_time = 5.0 assert(not(e2 < e1)) assert(not(e1 < e2))
def test_create_event_bad_changed_start_time(self): e = Event(1.0, 2.0, 'Tuesday', 1) with self.assertRaises(ValueError): e.start_time = 3.0 with self.assertRaises(ValueError): e.start_time = 24.0