From: Matthew Fernandez Date: Mon, 28 Dec 2020 03:13:58 +0000 (-0800) Subject: fix: remove Circo test of root.gv from rtest.py-tested graphs X-Git-Tag: 2.46.1~21^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3089d8a66625856aaf8a7d9042111e4ad54fa7ab;p=graphviz fix: remove Circo test of root.gv from rtest.py-tested graphs This graph generates an overflow when computing the area of rectangles required to layout it out. It should be rejected but it currently incorrectly is not. Related to #1906. --- diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 086eb97a2..fa9f249ce 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -559,6 +559,27 @@ def test_1869(variant: int): assert 'style=dashed' in output, 'style=dashed not found in DOT output' assert 'penwidth=2' in output, 'penwidth=2 not found in DOT output' +@pytest.mark.xfail(strict=True) # FIXME +def test_1906(): + ''' + graphs that cause an overflow during rectangle calculation should result in + a layout error + https://gitlab.com/graphviz/graphviz/-/issues/1906 + ''' + + # one of the rtest graphs is sufficient to provoke this + input = os.path.join(os.path.dirname(__file__), 'graphs/root.gv') + assert os.path.exists(input), 'unexpectedly missing test case' + + # use Circo to translate it to DOT + p = subprocess.Popen(['dot', '-Kcirco', '-Tgv', '-o', os.devnull, input], + stderr=subprocess.PIPE, universal_newlines=True) + _, stderr = p.communicate() + + assert p.returncode != 0, 'graph that generates overflow was accepted' + + assert 'area too large' in stderr, 'missing/incorrect error message' + @pytest.mark.skipif(shutil.which('twopi') is None, reason='twopi not available') def test_1907(): ''' diff --git a/rtest/tests.txt b/rtest/tests.txt index 3aac85351..f14172b40 100644 --- a/rtest/tests.txt +++ b/rtest/tests.txt @@ -260,7 +260,6 @@ dot gv root = twopi gv -circo gv cairo = diff --git a/rtest/tests_subset.txt b/rtest/tests_subset.txt index ca0661a6a..6be29266a 100644 --- a/rtest/tests_subset.txt +++ b/rtest/tests_subset.txt @@ -260,7 +260,6 @@ dot gv #root #= #twopi gv -#circo gv #cairo #=