예제 #1
0
def test_outside_right_2():
    assert SECOND_MONITOR.width() == 800
    assert SECOND_MONITOR.left() == 100

    window = QRect(950, 110, 150, 100)
    actual = make_visible(SECOND_MONITOR, window)

    assert actual == QRect(750, 110, 150, 100)
예제 #2
0
def test_second_monitor():
    window = QRect(-10, -10, 1200, 1200)
    actual = make_visible(SECOND_MONITOR, window)

    assert actual == SECOND_MONITOR
예제 #3
0
def test_outside():
    window = QRect(-10, -10, 1200, 1200)
    actual = make_visible(SCREEN, window)

    assert actual == SCREEN
예제 #4
0
def test_outside_top():
    window = QRect(10, -10, 100, 100)
    actual = make_visible(SCREEN, window)

    assert actual == QRect(10, 0, 100, 100)
예제 #5
0
def test_outside_left():
    window = QRect(-10, 10, 100, 100)
    actual = make_visible(SCREEN, window)

    assert actual == QRect(0, 10, 100, 100)
예제 #6
0
def test_outside_bottom_right():
    window = QRect(1200, 1100, 100, 100)
    actual = make_visible(SCREEN, window)

    assert actual == QRect(900, 700, 100, 100)
예제 #7
0
def test_outside_bottom():
    window = QRect(10, 750, 100, 100)
    actual = make_visible(SCREEN, window)

    assert actual == QRect(10, 700, 100, 100)
예제 #8
0
def test_outside_right():
    window = QRect(950, 10, 100, 100)
    actual = make_visible(SCREEN, window)

    assert actual == QRect(900, 10, 100, 100)
예제 #9
0
def test_fully_visible_2():
    window = QRect(110, 110, 100, 100)
    actual = make_visible(SECOND_MONITOR, window)
    assert actual == window
예제 #10
0
def test_fully_visible():
    window = QRect(10, 10, 100, 100)
    actual = make_visible(SCREEN, window)
    assert actual == window