test_dot_writer.py 586 Bytes
Newer Older
Lucas Bourneuf's avatar
Lucas Bourneuf committed
1 2 3 4 5 6 7 8 9 10 11 12


from biseau import asp_to_dot


def test_basic_visual_config():
    config = asp_to_dot.visual_config_from_atoms({}, {
        'link': {('a', 'b'), ('c', 'd')},
        'color': {('a', 'red')}
    }, ' ')
    assert set(config.arcs) == {('a', 'b'), ('c', 'd')}
    assert config.properties == {'a': {'fillcolor': 'red'}}
13 14 15 16 17 18 19 20 21


def test_basic_visual_config():
    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'}