예제 #1
0
def test_multiple():
    new_shield = shield.Static("git",
                               "hub",
                               "lightgrey",
                               colorA="FF00FF",
                               colorB="FF00FF",
                               label="bar",
                               logo="github")
    print("![](%s)" % new_shield.generate())
예제 #2
0
 def test_color(self):
     new_shield = shield.Static("foo", "bar", "redr")
     self.assertRaises(ValueError, new_shield.generate)
예제 #3
0
def test_colorB():
    new_shield = shield.Static("color", "b", "lightgrey", colorB="FF00FF")
    print("![](%s)" % new_shield.generate())
예제 #4
0
def test_label():
    new_shield = shield.Static("foo", "bar", "lightgrey", label="label")
    print("![](%s)" % new_shield.generate())
예제 #5
0
def test_color_hex():
    new_shield = shield.Static("hex", "FF00FF", "FF00FF")
    print("![](%s)" % new_shield.generate())
예제 #6
0
def test_logos():
    for logo in shield.Logos:
        new_shield = shield.Static("logo", logo, "lightgrey", logo=logo)
        print("![](%s)" % new_shield.generate())
예제 #7
0
def test_colors():
    for color in shield.Colors:
        new_shield = shield.Static("color", color, color)
        print("![](%s)" % new_shield.generate())
예제 #8
0
def test_styles():
    for style in shield.Styles:
        new_shield = shield.Static("style", style, "lightgrey", style=style)
        print("![](%s)" % new_shield.generate())
예제 #9
0
def test_static():
    new_shield = shield.Static("py", "shields", "lightgrey")
    print("![](%s)" % new_shield.generate())
예제 #10
0
 def test_style(self):
     new_shield = shield.Static("foo", "bar", "red", style="foobar")
     self.assertRaises(ValueError, new_shield.generate)
예제 #11
0
 def test_hex(self):
     new_shield = shield.Static("foo", "bar", "FFFF")
     self.assertRaises(ValueError, new_shield.generate)