Commit 891bfd4b authored by Lucas Bourneuf's avatar Lucas Bourneuf

test some color system

parent f6de6dcc
......@@ -33,3 +33,17 @@ def test_complex_labelling():
assert set(config.properties['a']['label'].split()) == {'toto', 'tutu'}
assert config.properties['a']['fillcolor'] == 'green'
assert config.properties['b']['fillcolor'] == 'green:red;0.25:blue'
def test_colors():
config = asp_to_dot.visual_config_from_atoms({}, {
'link': {('a', 'b'), ('c', 'd')},
'color': {('a','green'), ('b','#00FF00'), ('c','#00FF0099'), ('d','#00FF0033')},
}, ' ')
assert set(config.arcs) == {('a', 'b'), ('c', 'd')}
# print(dir(config))
print(config.properties['a'])
assert config.properties['a']['fillcolor'] == 'green'
assert config.properties['b']['fillcolor'] == '#00FF00'
assert config.properties['c']['fillcolor'] == '#00FF0099'
assert config.properties['d']['fillcolor'] == '#00FF0033'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment