def test_diffd_complete_overlap(): print("Instance on different days, completely overlapping time range") instance = { 'begin_datetime': '2013-05-12T03:30:00+00:00', 'end_dateTime': '2013-05-15T04:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == True
def test_diffd_begin_overlap(): print("Instance on different days, partially overlapping time range") instance = { 'begin_datetime': '2013-05-12T22:30:00+00:00', 'end_dateTime': '2013-05-13T11:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == True
def test_samed_after(): print("Instance on same day, after time range") instance = { 'begin_datetime': '2013-05-12T22:30:00+00:00', 'end_dateTime': '2013-05-12T23:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == False
def test_samed_end_overlap(): print("Instance on same day, partial back overlap of time range") instance = { 'begin_datetime': '2013-05-12T17:30:00+00:00', 'end_dateTime': '2013-05-12T19:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == True
def test_samed_complete_overlap(): print("Instance on same day, completely overlapping time range") instance = { 'begin_datetime': '2013-05-12T08:30:00+00:00', 'end_dateTime': '2013-05-12T20:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == True
def test_samed_completely_within(): print("Instance on same day, completely within time range") instance = { 'begin_datetime': '2013-05-12T10:30:00+00:00', 'end_dateTime': '2013-05-12T11:30:00+00:00' } assert really_between_times(instance, BEGIN_TIME, END_TIME) == True