Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
def test_rgb2css():
assert rgb2css(red) == '#ff0000'
assert rgb2css(green) == '#00ff00'
assert rgb2css(yellow) == '#00ffff'
assert rgb2css(blue) == '#0000ff'
assert rgb2css(black) == '#000000'
assert rgb2css(white) == '#ffffff'
visited.add(b)
space = colors.ColorSpace(visited)
for src in sorted(visited):
bg, fg = depgraph.get_colors(src, space)
kwargs = {}
if src.name in depgraph.cyclenodes:
kwargs['shape'] = 'octagon'
ctx.write_node(
src.name,
label=src.get_label(splitlength=14,
rmprefix=self.kw.get('rmprefix')),
fillcolor=colors.rgb2css(bg),
fontcolor=colors.rgb2css(fg),
**kwargs
)
return ctx.text()