def test_base_widget_decorate_self_attributes_empty(): """ Test decorate_with_self_attributes without any parameter """ w = Widget() kwargs = { "text": "test", "fg": "#FFFF11", "bg": "#FF9021", "font": 1, "padding": 2, "actions": {1: "firefox", 3: "urxvt"}, "icon": "\uf04c", } assert w.decorate_with_self_attributes(**kwargs) == w.decorate(**kwargs)
def test_base_widget_decorate_self_attributes(): """ Test decorate_with_self_attributes without any parameter """ fg = "#FFFF11" bg = "#FF9021" padding = 2 kwargs = {"fg": fg, "bg": bg, "padding": padding} w = Widget(fonts=[1, ], **kwargs) assert (w.decorate_with_self_attributes("test") == w.decorate("test", font=1, **kwargs))