From 31dce016f4c0eadb19ac0c513aff0d3c2fdd901f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 20 Jun 2022 19:49:12 -0700 Subject: [PATCH] add a test case for #121 --- tests/121.dot | 26 ++++++++++++++++++++++++++ tests/test_regression.py | 14 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/121.dot 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 -- 2.40.0