Esempio n. 1
0
def test_repr_xephyr():
    display = Display(visible=True)
    print(repr(display))

    display = Display(backend="xephyr")
    print(repr(display))

    display = XephyrDisplay()
    print(repr(display))
Esempio n. 2
0
def test_extra_args():
    # Unrecognized option
    d = Display(extra_args=["willcrash"])
    with pytest.raises(XStartError):
        d.start()

    with Display():
        # -c                     turns off key-click
        with Display(visible=True, extra_args=["-c"]) as d:
            assert d.is_alive()
        assert not d.is_alive()

        with XephyrDisplay(extra_args=["-c"]) as d:
            assert d.is_alive()
        assert not d.is_alive()
Esempio n. 3
0
def test_is_started():
    #     d = Display()
    #     assert not d._is_started
    #     d.start()
    #     assert d._is_started
    #     d.stop()
    #     assert d._is_started

    # with Display() as d:
    #     assert d._is_started
    # assert d._is_started

    with XvfbDisplay() as d:
        assert d._is_started
    assert d._is_started

    with Display():
        with XephyrDisplay() as d:
            assert d._is_started
        assert d._is_started
Esempio n. 4
0
def test_repr4():
    display = XephyrDisplay()
    print(repr(display))