Commit 0bebd246 authored by Aluriak's avatar Aluriak

fix existing test + new test on complex edge colorscheme

parent 8b938614
......@@ -12,10 +12,24 @@ def test_basic_visual_config():
assert config.properties == {'a': {'fillcolor': 'red'}}
def test_basic_visual_config():
def test_basic_visual_config_2():
config = asp_to_dot.visual_config_from_atoms({}, {
'link': {('a', 'b'), ('c', 'd')},
'node': {('e',)},
}, ' ')
assert set(config.arcs) == {('a', 'b'), ('c', 'd')}
assert set(config.nodes) == {'e'}
def test_complex_labelling():
config = asp_to_dot.visual_config_from_atoms({}, {
'link': {('a', 'b'), ('c', 'd')},
'label': {('a', '"toto"'), ('a', '"tutu"')},
'color': {('a','green'), ('b','green:red;0.25:blue')},
}, ' ')
assert set(config.arcs) == {('a', 'b'), ('c', 'd')}
# print(dir(config))
print(config.properties['a'])
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'
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