Esempio n. 1
0
def test_not_equal_disjoint():
    intervals = [(1, 5), (7, 10)]
    result = carryover.merge_intervals(intervals)
    assert list(result) == [(1, 5), (7, 10)]
Esempio n. 2
0
def test_overlap():
    intervals = [(2, 3), (1, 5)]
    result = carryover.merge_intervals(intervals)
    assert list(result) == [(1, 5)]
Esempio n. 3
0
def test_equal():
    intervals = [(1, 5), (1, 5)]
    result = carryover.merge_intervals(intervals)
    assert list(result) == [(1, 5)]