From: Matthew Fernandez Date: Tue, 21 Jun 2022 02:49:12 +0000 (-0700) Subject: add a test case for #121 X-Git-Tag: 5.0.0~11^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31dce016f4c0eadb19ac0c513aff0d3c2fdd901f;p=graphviz add a test case for #121 --- diff --git a/tests/121.dot b/tests/121.dot new file mode 100644 index 000000000..e6efade4c --- /dev/null +++ b/tests/121.dot @@ -0,0 +1,26 @@ +digraph G +{ + subgraph cluster_G1 + { + { + rank=same; + A -> B; + } + + C -> A; + } + + subgraph cluster_G2 + { + { + rank=same; + D -> E; + } + + F -> E; + } + + B -> D [ constraint=none ]; + B -> D [ constraint=none ]; +} + diff --git a/tests/test_regression.py b/tests/test_regression.py index 5a6c4aa78..35cdb313c 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -104,6 +104,20 @@ def test_56(): # process it with Graphviz dot("svg", input) +@pytest.mark.xfail() +def test_121(): + """ + test a graph that previously caused an assertion failure in `merge_chain` + https://gitlab.com/graphviz/graphviz/-/issues/121 + """ + + # locate our associated test case in this directory + input = Path(__file__).parent / "121.dot" + assert input.exists(), "unexpectedly missing test case" + + # process it with Graphviz + dot("pdf", input) + def test_131(): """ PIC back end should produce valid output