From 220485aa66f4d14f9c5230aaaba8986779778cc0 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 14 Nov 2022 19:32:37 -0800 Subject: [PATCH] add a test case for #42 --- tests/42.dot | 436 +++++++++++++++++++++++++++++++++++++++ tests/test_regression.py | 16 ++ 2 files changed, 452 insertions(+) create mode 100644 tests/42.dot diff --git a/tests/42.dot b/tests/42.dot new file mode 100644 index 000000000..662547336 --- /dev/null +++ b/tests/42.dot @@ -0,0 +1,436 @@ +strict digraph { + graph [dpi=72, + outputorder=edgesfirst, + splines=true + ]; + node [fillcolor=white, + fixedsize=true, + shape=circle, + style=filled + ]; + 0 [pos="734.950000,1356.800000!", + width=1.3149347086]; + 1 [pos="1357.700000,693.660000!", + width=1.15161212811]; + 0 -> 1 [color="#0000ff7d", + penwidth=2.50200843045, + weight=0.490205802132]; + 3 [pos="1336.800000,858.910000!", + width=0.963180880181]; + 0 -> 3 [color="#0000ff24", + penwidth=0.822910984379, + weight=0.147532853955]; + 7 [pos="410.310000,1294.900000!", + width=0.87807603364]; + 0 -> 7 [color="#0000ff27", + penwidth=0.855715348376, + weight=0.154227622118]; + 12 [pos="568.720000,1346.400000!", + width=0.858674418507]; + 0 -> 12 [color="#0000ff1d", + penwidth=0.671038928837, + weight=0.116538556906]; + 20 [pos="734.950000,30.500000!", + width=0.841089344449]; + 0 -> 20 [color="#0000ff17", + penwidth=0.548326307959, + weight=0.0914951648897]; + 1 -> 0 [color="#0000ffa2", + penwidth=3.20787037037, + weight=0.634259259259]; + 4 [pos="155.660000,1084.200000!", + width=0.953417189458]; + 1 -> 4 [color="#0000ff16", + penwidth=0.526481481481, + weight=0.087037037037]; + 5 [pos="1275.500000,1013.800000!", + width=0.967986343603]; + 1 -> 5 [color="#0000ff13", + penwidth=0.475061728395, + weight=0.0765432098765]; + 6 [pos="269.680000,181.680000!", + width=0.935519389562]; + 1 -> 6 [color="#0000ff26", + penwidth=0.845586419753, + weight=0.152160493827]; + 1 -> 12 [color="#0000ff0c", + penwidth=0.345, + weight=0.05]; + 2 [pos="34.000000,610.380000!", + width=0.940626631876]; + 2 -> 0 [color="#0000ff10", + penwidth=0.408747220163, + weight=0.063009636768]; + 2 -> 4 [color="#0000ff19", + penwidth=0.579466271312, + weight=0.0978502594514]; + 2 -> 6 [color="#0000ff34", + penwidth=1.11341734618, + weight=0.206819866568]; + 8 [pos="75.422000,449.050000!", + width=0.848479720584]; + 2 -> 8 [color="#0000ff81", + penwidth=2.58087472202, + weight=0.506300963677]; + 10 [pos="568.720000,40.958000!", + width=0.881838076882]; + 2 -> 10 [color="#0000ff20", + penwidth=0.717494440326, + weight=0.126019273536]; + 3 -> 0 [color="#0000ffa3", + penwidth=3.23702201622, + weight=0.640208574739]; + 3 -> 1 [color="#0000ff28", + penwidth=0.869351100811, + weight=0.157010428737]; + 3 -> 5 [color="#0000ff12", + penwidth=0.449188876014, + weight=0.0712630359212]; + 3 -> 7 [color="#0000ff0d", + penwidth=0.364020857474, + weight=0.0538818076477]; + 11 [pos="898.570000,1325.600000!", + width=0.827708042055]; + 3 -> 11 [color="#0000ff13", + penwidth=0.480417149479, + weight=0.0776361529548]; + 4 -> 1 [color="#0000ff61", + penwidth=1.99035532995, + weight=0.38578680203]; + 4 -> 2 [color="#0000ff1b", + penwidth=0.629441624365, + weight=0.108049311095]; + 4 -> 5 [color="#0000ff43", + penwidth=1.38274111675, + weight=0.261783901378]; + 4 -> 11 [color="#0000ff1b", + penwidth=0.625888324873, + weight=0.107324147933]; + 16 [pos="75.422000,938.270000!", + width=0.861779882676]; + 4 -> 16 [color="#0000ff23", + penwidth=0.771573604061, + weight=0.137055837563]; + 5 -> 0 [color="#0000ff3c", + penwidth=1.26520998865, + weight=0.237797956867]; + 5 -> 1 [color="#0000ff41", + penwidth=1.37644721907, + weight=0.260499432463]; + 5 -> 4 [color="#0000ff36", + penwidth=1.14841089671, + weight=0.213961407491]; + 9 [pos="1177.600000,1148.500000!", + width=0.868249870922]; + 5 -> 9 [color="#0000ff2b", + penwidth=0.928717366629, + weight=0.16912599319]; + 5 -> 11 [color="#0000ff1e", + penwidth=0.681214528944, + weight=0.118615209989]; + 6 -> 1 [color="#0000ff2a", + penwidth=0.914366197183, + weight=0.166197183099]; + 6 -> 2 [color="#0000ff49", + penwidth=1.51248826291, + weight=0.288262910798]; + 6 -> 10 [color="#0000ff2a", + penwidth=0.914366197183, + weight=0.166197183099]; + 19 [pos="155.660000,303.090000!", + width=0.714452488442]; + 6 -> 19 [color="#0000ff28", + penwidth=0.900563380282, + weight=0.16338028169]; + 6 -> 20 [color="#0000ff37", + penwidth=1.15821596244, + weight=0.215962441315]; + 7 -> 0 [color="#0000ff70", + penwidth=2.24747826087, + weight=0.438260869565]; + 7 -> 3 [color="#0000ff24", + penwidth=0.820086956522, + weight=0.146956521739]; + 7 -> 6 [color="#0000ff27", + penwidth=0.849913043478, + weight=0.153043478261]; + 7 -> 12 [color="#0000ff20", + penwidth=0.730608695652, + weight=0.128695652174]; + 7 -> 20 [color="#0000ff22", + penwidth=0.751913043478, + weight=0.133043478261]; + 8 -> 2 [color="#0000ffc9", + penwidth=3.96182190379, + weight=0.78812691914]; + 8 -> 4 [color="#0000ff0e", + penwidth=0.375844421699, + weight=0.0562947799386]; + 8 -> 6 [color="#0000ff0d", + penwidth=0.35076765609, + weight=0.0511770726714]; + 8 -> 10 [color="#0000ff09", + penwidth=0.290583418628, + weight=0.0388945752303]; + 8 -> 16 [color="#0000ff10", + penwidth=0.420982599795, + weight=0.0655066530194]; + 9 -> 0 [color="#0000ff5b", + penwidth=1.84262144821, + weight=0.355637030247]; + 9 -> 3 [color="#0000ff2c", + penwidth=0.957836846929, + weight=0.175068744271]; + 9 -> 5 [color="#0000ff56", + penwidth=1.75728689276, + weight=0.338221814849]; + 9 -> 7 [color="#0000ff14", + penwidth=0.495233730522, + weight=0.0806599450046]; + 9 -> 11 [color="#0000ff0c", + penwidth=0.347021081577, + weight=0.0504124656279]; + 10 -> 2 [color="#0000ff22", + penwidth=0.752203975799, + weight=0.133102852204]; + 14 [pos="1177.600000,238.800000!", + width=0.931793258521]; + 10 -> 14 [color="#0000ff47", + penwidth=1.46369922213, + weight=0.278305963699]; + 15 [pos="1336.800000,528.410000!", + width=0.849370291217]; + 10 -> 15 [color="#0000ff34", + penwidth=1.11218668971, + weight=0.206568712187]; + 17 [pos="1049.300000,132.630000!", + width=0.814745397879]; + 10 -> 17 [color="#0000ff34", + penwidth=1.11642178047, + weight=0.207433016422]; + 18 [pos="898.570000,61.710000!", + width=0.807958713697]; + 10 -> 18 [color="#0000ff2c", + penwidth=0.955488331893, + weight=0.174589455488]; + 11 -> 0 [color="#0000ff47", + penwidth=1.46784452297, + weight=0.279151943463]; + 11 -> 3 [color="#0000ff38", + penwidth=1.19658421673, + weight=0.223792697291]; + 11 -> 4 [color="#0000ff12", + penwidth=0.44628975265, + weight=0.0706713780919]; + 11 -> 5 [color="#0000ff32", + penwidth=1.0753828033, + weight=0.199057714959]; + 11 -> 12 [color="#0000ff3a", + penwidth=1.21389870436, + weight=0.227326266196]; + 12 -> 4 [color="#0000ff18", + penwidth=0.577435897436, + weight=0.0974358974359]; + 12 -> 6 [color="#0000ff47", + penwidth=1.46948717949, + weight=0.279487179487]; + 12 -> 19 [color="#0000ff40", + penwidth=1.33128205128, + weight=0.251282051282]; + 12 -> 20 [color="#0000ff3c", + penwidth=1.2558974359, + weight=0.235897435897]; + 24 [pos="1049.300000,1254.700000!", + width=0.719323774067]; + 12 -> 24 [color="#0000ff22", + penwidth=0.765897435897, + weight=0.135897435897]; + 13 [pos="1275.500000,373.550000!", + width=0.815140063109]; + 13 -> 14 [color="#0000ff5c", + penwidth=1.87713534823, + weight=0.362680683311]; + 13 -> 15 [color="#0000ff41", + penwidth=1.38134034166, + weight=0.261498028909]; + 13 -> 17 [color="#0000ff14", + penwidth=0.486333771353, + weight=0.0788436268068]; + 13 -> 18 [color="#0000ff2b", + penwidth=0.924178712221, + weight=0.168199737188]; + 21 [pos="34.000000,776.940000!", + width=0.778498283534]; + 13 -> 21 [color="#0000ff20", + penwidth=0.731011826544, + weight=0.128777923784]; + 14 -> 13 [color="#0000ff5c", + penwidth=1.87255033557, + weight=0.361744966443]; + 14 -> 15 [color="#0000ff4d", + penwidth=1.58315436242, + weight=0.302684563758]; + 14 -> 17 [color="#0000ff18", + penwidth=0.563691275168, + weight=0.0946308724832]; + 14 -> 18 [color="#0000ff20", + penwidth=0.721543624161, + weight=0.126845637584]; + 14 -> 21 [color="#0000ff1d", + penwidth=0.659060402685, + weight=0.114093959732]; + 15 -> 10 [color="#0000ff27", + penwidth=0.858151609553, + weight=0.154724818276]; + 15 -> 13 [color="#0000ff45", + penwidth=1.42294911734, + weight=0.269989615784]; + 15 -> 14 [color="#0000ff64", + penwidth=2.02845275182, + weight=0.393561786085]; + 15 -> 17 [color="#0000ff1b", + penwidth=0.629179646937, + weight=0.107995846314]; + 15 -> 18 [color="#0000ff12", + penwidth=0.461266874351, + weight=0.073727933541]; + 16 -> 0 [color="#0000ff2c", + penwidth=0.946913580247, + weight=0.172839506173]; + 16 -> 2 [color="#0000ff2c", + penwidth=0.946913580247, + weight=0.172839506173]; + 16 -> 4 [color="#0000ff71", + penwidth=2.29639126306, + weight=0.44824311491]; + 16 -> 9 [color="#0000ff1a", + penwidth=0.616524216524, + weight=0.105413105413]; + 16 -> 11 [color="#0000ff19", + penwidth=0.593257359924, + weight=0.100664767331]; + 17 -> 8 [color="#0000ff0d", + penwidth=0.35, + weight=0.0510204081633]; + 17 -> 10 [color="#0000ff4c", + penwidth=1.57142857143, + weight=0.30029154519]; + 17 -> 14 [color="#0000ff2b", + penwidth=0.935714285714, + weight=0.17055393586]; + 17 -> 18 [color="#0000ff34", + penwidth=1.1, + weight=0.204081632653]; + 17 -> 21 [color="#0000ff46", + penwidth=1.44285714286, + weight=0.274052478134]; + 18 -> 0 [color="#0000ff4f", + penwidth=1.63082287308, + weight=0.312412831241]; + 18 -> 4 [color="#0000ff23", + penwidth=0.776569037657, + weight=0.138075313808]; + 18 -> 6 [color="#0000ff44", + penwidth=1.4189679219, + weight=0.269177126918]; + 18 -> 7 [color="#0000ff27", + penwidth=0.851743375174, + weight=0.153417015342]; + 18 -> 16 [color="#0000ff20", + penwidth=0.72189679219, + weight=0.126917712692]; + 19 -> 6 [color="#0000ff36", + penwidth=1.14712328767, + weight=0.213698630137]; + 19 -> 8 [color="#0000ff1c", + penwidth=0.650410958904, + weight=0.112328767123]; + 19 -> 10 [color="#0000ff4b", + penwidth=1.53643835616, + weight=0.293150684932]; + 19 -> 17 [color="#0000ff41", + penwidth=1.37534246575, + weight=0.260273972603]; + 19 -> 21 [color="#0000ff1e", + penwidth=0.690684931507, + weight=0.120547945205]; + 20 -> 10 [color="#0000ff4e", + penwidth=1.59663043478, + weight=0.305434782609]; + 20 -> 14 [color="#0000ff70", + penwidth=2.26239130435, + weight=0.441304347826]; + 20 -> 15 [color="#0000ff19", + penwidth=0.595326086957, + weight=0.101086956522]; + 20 -> 17 [color="#0000ff1d", + penwidth=0.669891304348, + weight=0.116304347826]; + 20 -> 18 [color="#0000ff09", + penwidth=0.275760869565, + weight=0.0358695652174]; + 21 -> 5 [color="#0000ff2a", + penwidth=0.916666666667, + weight=0.166666666667]; + 21 -> 7 [color="#0000ff23", + penwidth=0.783173076923, + weight=0.139423076923]; + 21 -> 11 [color="#0000ff22", + penwidth=0.751762820513, + weight=0.133012820513]; + 21 -> 16 [color="#0000ff6e", + penwidth=2.21233974359, + weight=0.43108974359]; + 21 -> 24 [color="#0000ff20", + penwidth=0.736057692308, + weight=0.129807692308]; + 22 [pos="410.310000,92.429000!", + width=0.668712775145]; + 22 -> 6 [color="#0000ff2b", + penwidth=0.934497816594, + weight=0.170305676856]; + 22 -> 8 [color="#0000ff30", + penwidth=1.04148471616, + weight=0.192139737991]; + 22 -> 10 [color="#0000ff32", + penwidth=1.06288209607, + weight=0.196506550218]; + 22 -> 17 [color="#0000ff37", + penwidth=1.16986899563, + weight=0.218340611354]; + 23 [pos="269.680000,1205.600000!", + width=0.739635533208]; + 22 -> 23 [color="#0000ff38", + penwidth=1.19126637555, + weight=0.222707423581]; + 23 -> 0 [color="#0000ff4f", + penwidth=1.62727272727, + weight=0.311688311688]; + 23 -> 4 [color="#0000ff37", + penwidth=1.17121212121, + weight=0.218614718615]; + 23 -> 7 [color="#0000ff28", + penwidth=0.895454545455, + weight=0.162337662338]; + 23 -> 11 [color="#0000ff24", + penwidth=0.821212121212, + weight=0.147186147186]; + 23 -> 22 [color="#0000ff28", + penwidth=0.884848484848, + weight=0.160173160173]; + 24 -> 5 [color="#0000ff4c", + penwidth=1.56873385013, + weight=0.299741602067]; + 24 -> 7 [color="#0000ff2f", + penwidth=1.01162790698, + weight=0.186046511628]; + 24 -> 9 [color="#0000ff32", + penwidth=1.06227390181, + weight=0.196382428941]; + 24 -> 11 [color="#0000ff28", + penwidth=0.872351421189, + weight=0.157622739018]; + 24 -> 12 [color="#0000ff28", + penwidth=0.885012919897, + weight=0.160206718346]; +} \ No newline at end of file diff --git a/tests/test_regression.py b/tests/test_regression.py index ad442c262..0e727f3a7 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -74,6 +74,22 @@ def test_14(): # process it with Graphviz dot("svg", input) +@pytest.mark.skipif(which("neato") is None, reason="neato not available") +@pytest.mark.xfail() +def test_42(): + """ + check for a former crash in neatogen + https://gitlab.com/graphviz/graphviz/-/issues/42 + """ + + # locate our associated test case in this directory + input = Path(__file__).parent / "42.dot" + assert input.exists(), "unexpectedly missing test case" + + # process it with Graphviz + subprocess.check_call(["neato", "-n2", "-Tpng", input], + stdout=subprocess.DEVNULL) + def test_56(): """ parsing a particular graph should not cause a Trapezoid-table overflow -- 2.40.0