def test_window_intersection_disjunct(): with pytest.raises(ValueError): window_intersection([ ((0, 6), (3, 6)), ((100, 200), (0, 12)), ((7, 12), (7, 12)) ])
def test_window_intersection(): assert window_intersection([((0, 6), (3, 6)), ((2, 4), (1, 5))]) == ((2, 4), (3, 5)) assert window_intersection([((0, 6), (3, 6)), ((6, 10), (1, 5))]) == ((6, 6), (3, 5)) assert window_intersection([((0, 6), (3, 6)), ((2, 4), (1, 5)), ((3, 6), (0, 6))]) == ((3, 4), (3, 5))
def test_window_intersection(): assert window_intersection([ ((0, 6), (3, 6)), ((2, 4), (1, 5)) ]) == ((2, 4), (3, 5)) assert window_intersection([ ((0, 6), (3, 6)), ((6, 10), (1, 5)) ]) == ((6, 6), (3, 5)) assert window_intersection([ ((0, 6), (3, 6)), ((2, 4), (1, 5)), ((3, 6), (0, 6)) ]) == ((3, 4), (3, 5))
def test_window_intersection(recwarn): data = [((0, 6), (3, 6)), ((2, 4), (1, 5))] warnings.simplefilter('always') old = window_intersection(data) assert len(recwarn) == 1 assert recwarn.pop(DeprecationWarning) new = windows.intersection(data) assert len(recwarn) == 0 assert old == new
def test_window_intersection(recwarn): data = [ ((0, 6), (3, 6)), ((2, 4), (1, 5))] warnings.simplefilter('always') old = window_intersection(data) assert len(recwarn) == 1 assert recwarn.pop(DeprecationWarning) new = windows.intersection(data) assert len(recwarn) == 0 assert old == new
def test_window_intersection_disjunct(): with pytest.raises(ValueError): window_intersection([((0, 6), (3, 6)), ((100, 200), (0, 12)), ((7, 12), (7, 12))])