Esempio n. 1
0
def backend_to_check(backend, delay=0):
    refimgpath = fillscreen.init()
    backend_ref(backend, childprocess=True, refimgpath=refimgpath, delay=delay)

    # childprocess=False is tested in a subprocess for isolation
    cmd = [
        sys.executable,
        __file__.rsplit(".", 1)[0] + ".py",
        backend if backend else "",
        refimgpath,
        str(delay),
        "--debug",
    ]
    p = EasyProcess(cmd).call()
    assert p.return_code == 0

    if platform_is_linux() and prog_check(["Xvfb", "-help"]):
        check_double_disp(backend)
Esempio n. 2
0
def backend_to_check(backend):
    refimgpath = fillscreen.init()
    _backend_check(backend, childprocess=None, refimgpath=refimgpath)
Esempio n. 3
0
def backend_to_check(backend):
    with TempDir() as d:
        refimgpath = d / "ref.bmp"
        fillscreen.init(refimgpath)
        _backend_check(backend, childprocess=True, refimgpath=refimgpath)
Esempio n. 4
0
def backend_to_check(backend, delay=0):
    refimgpath = fillscreen.init()
    backend_ref(backend, childprocess=True, refimgpath=refimgpath, delay=delay)
    backend_ref(backend, childprocess=None, refimgpath=refimgpath, delay=delay)