Ejemplo n.º 1
0
def test_XCursor_generate_with_static_config(static_config, image_dir) -> None:
    """Testing XCursor generate **static** cursors."""
    x = XCursor(static_config, image_dir)
    x.generate()

    assert x.out.exists() is True
    assert x.out.__sizeof__() > 0
Ejemplo n.º 2
0
def test_XCursor_generate_exception(image_dir) -> None:
    """Testing XCursor generate **RuntimeError** exception."""
    cfg: Path = image_dir / "test.alias"
    cfg.write_text("10 10 10 test/test.png")
    x = XCursor(cfg, image_dir)
    with pytest.raises(RuntimeError) as excinfo:
        x.generate()

    assert (str(excinfo.value) ==
            "'xcursorgen' failed to generate XCursor from 'test.alias'")