예제 #1
0
def test_windows_intersect_disjunct():
    assert windows_intersect([((0, 6), (3, 6)), ((10, 20), (0, 6))]) == False

    assert windows_intersect([((0, 6), (3, 6)), ((2, 4), (1, 5)),
                              ((5, 6), (0, 6))]) == False

    assert windows_intersect([((0, 6), (3, 6)), ((2, 4), (1, 3)),
                              ((3, 6), (4, 6))]) == False
예제 #2
0
def test_windows_intersect():
    assert windows_intersect([
        ((0, 6), (3, 6)),
        ((2, 4), (1, 5))
    ]) == True

    assert windows_intersect([
        ((0, 6), (3, 6)),
        ((2, 4), (1, 5)),
        ((3, 6), (0, 6))
    ]) == True
예제 #3
0
def test_windows_intersect_disjunct():
    assert windows_intersect([
        ((0, 6), (3, 6)),
        ((10, 20), (0, 6))
    ]) == False

    assert windows_intersect([
        ((0, 6), (3, 6)),
        ((2, 4), (1, 5)),
        ((5, 6), (0, 6))
    ]) == False

    assert windows_intersect([
        ((0, 6), (3, 6)),
        ((2, 4), (1, 3)),
        ((3, 6), (4, 6))
    ]) == False
예제 #4
0
def test_windows_intersect_disjunct(recwarn):
    data = [((0, 6), (3, 6)), ((2, 4), (1, 5))]
    warnings.simplefilter('always')
    old = windows_intersect(data)
    assert len(recwarn) == 1
    assert recwarn.pop(DeprecationWarning)
    new = windows.intersect(data)
    assert len(recwarn) == 0
    assert old == new
예제 #5
0
def test_windows_intersect_disjunct(recwarn):
    data = [
        ((0, 6), (3, 6)),
        ((2, 4), (1, 5))]
    warnings.simplefilter('always')
    old = windows_intersect(data)
    assert len(recwarn) == 1
    assert recwarn.pop(DeprecationWarning)
    new = windows.intersect(data)
    assert len(recwarn) == 0
    assert old == new
예제 #6
0
def test_windows_intersect():
    assert windows_intersect([((0, 6), (3, 6)), ((2, 4), (1, 5))]) == True

    assert windows_intersect([((0, 6), (3, 6)), ((2, 4), (1, 5)),
                              ((3, 6), (0, 6))]) == True