Пример #1
0
def test_Rect_intersect9():
    r = Rect(1, 1, 3, 3)
    point = r.intersect(r=((0, 4), (4, 0)))
    assert point == (1, 3)
Пример #2
0
def test_Rect_intersect7():
    r = Rect(1, 1, 3, 3)
    point = r.intersect((0, 3), (4, 3))
    assert point == (1, 3)
Пример #3
0
def test_Rect_intersect6():
    r = Rect(1, 1, 3, 3)
    point = r.intersect((0, 0), (4, 4))
    assert point == (1, 1)
Пример #4
0
def test_Rect_intersect5():
    r = Rect(1, 1, 3, 3)
    point = r.intersect((0, 2), (10, 2))
    assert point == (1, 2)
Пример #5
0
def test_Rect_intersect2():
    r1 = Rect(0, 0, 3, 3)
    r2 = Rect(-1, -3, -2, -3)
    assert r1.intersect(r2).is_null()
Пример #6
0
def test_Rect_intersect1():
    r1 = Rect(0, 0, 3, 3)
    r2 = Rect(-1, -3, 2, 2)
    assert r1.intersect(r2) == Rect(0, 0, 2, 2)