From: Rob Hart Date: Sat, 19 Dec 2020 22:14:22 +0000 (-0800) Subject: Add regression test X-Git-Tag: 2.46.0~1^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f69e4f1852c89f683c87c191084431991995db2a;p=graphviz Add regression test Edit by Matthew Fernandez: moved this commit ahead of the one that fixes the bug and marked the test case as expected to fail. This allows us to more accurately confirm the bug exists and its fix works as intended, while still leaving the commit series bisectable. --- diff --git a/rtest/test_regression.py b/rtest/test_regression.py index fbe96c697..229ede0a4 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -559,6 +559,25 @@ 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 +@pytest.mark.skipif(shutil.which('twopi') is None, reason='twopi not available') +def test_1907(): + ''' + SVG edges should have title elements that match their names + https://gitlab.com/graphviz/graphviz/-/issues/1907 + ''' + + # a trivial graph to provoke this issue + input = 'digraph { A -> B -> C }' + + # generate an SVG from this input with twopi + p = subprocess.Popen(['twopi', '-Tsvg'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, + universal_newlines=True) + output, _ = p.communicate(input) + + assert 'A->B' in output, \ + 'element title not found in SVG' + @pytest.mark.skipif(shutil.which('gvpr') is None, reason='gvpr not available') def test_1909(): '''