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"
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"]
def fixture_th() -> Theme: th = Theme() th.from_config("modern-dark") assert th.get() == "modern-dark" return th
def fixture_th() -> Theme: th = Theme() th.from_config("modern-dark", config.theme_choices()) assert th.get() == "modern-dark" return th