def test_merge(self): style1 = Style(option_list=["red", "no-shadow", 3]) style2 = Style(option_list=["blue", "dotted"]) style1.merge(style2) assert style1.color() == [Style.COLORS["blue"]] assert style1.fill_type() == "dotted" assert style1.shadow() == "off" assert style1.width() == 3
def test_merge(self): style1 = Style(option_list=['red', 'no-shadow', 3]) style2 = Style(option_list=['blue', 'dotted']) style1.merge(style2) assert style1.color() == [Style.COLORS['blue']] assert style1.fill_type() == 'dotted' assert style1.shadow() == 'off' assert style1.width() == 3
def test_init(self): style = Style() assert style != None style = Style(option_list=["red", "no-shadow", 3]) assert style.color() == [Style.COLORS["red"]] assert style.shadow() == "off" assert style.width() == 3 style = Style(option_list=["shadow", 3.2]) assert style.shadow() == "on" assert style.width() == 3.2 style = Style(option_list=["solid"]) assert style.fill_type() == "solid" style = Style(option_list=["dashed"]) assert style.fill_type() == "dashed" style = Style(option_list=["dash-dotted"]) assert style.fill_type() == "dash-dotted" style = Style(option_list=["dotted"]) assert style.fill_type() == "dotted"
def test_init(self): style = Style() assert style != None style = Style(option_list=['red', 'no-shadow', 3]) assert style.color() == [Style.COLORS['red']] assert style.shadow() == 'off' assert style.width() == 3 style = Style(option_list=['shadow', 3.2]) assert style.shadow() == 'on' assert style.width() == 3.2 style = Style(option_list=['solid']) assert style.fill_type() == 'solid' style = Style(option_list=['dashed']) assert style.fill_type() == 'dashed' style = Style(option_list=['dash-dotted']) assert style.fill_type() == 'dash-dotted' style = Style(option_list=['dotted']) assert style.fill_type() == 'dotted'