Esempio n. 1
0
def test_detect_icon_path(th: Theme) -> None:
    assert th.get() == "modern-dark"
    assert th.detect_icon_path(
        "xyz", prefix="icon_") == "themes/facelift/images/icon_missing.svg"
    assert th.detect_icon_path(
        "ldap", prefix="icon_") == "themes/facelift/images/icon_ldap.svg"
    assert th.detect_icon_path(
        "email", prefix="icon_") == "themes/facelift/images/icon_email.png"
    assert th.detect_icon_path(
        "window_list", prefix="icon_") == "images/icons/window_list.png"
Esempio n. 2
0
def test_icon_themes(th: Theme) -> None:
    assert th.icon_themes() == ["modern-dark", "facelift"]

    th.set("facelift")
    assert th.get() == "facelift"
    assert th.icon_themes() == ["facelift"]
Esempio n. 3
0
def fixture_th() -> Theme:
    th = Theme()
    th.from_config("modern-dark")
    assert th.get() == "modern-dark"
    return th
Esempio n. 4
0
def fixture_th() -> Theme:
    th = Theme()
    th.from_config("modern-dark", config.theme_choices())
    assert th.get() == "modern-dark"
    return th