From: Vladimír Vondruš Date: Wed, 21 Aug 2024 10:05:24 +0000 (+0200) Subject: m.dot: adapt test to differences in output with graphviz 10. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=182939f4d403c42c061b6d37907fab2286b6da24;p=blog.git m.dot: adapt test to differences in output with graphviz 10. Or 9, or maybe 8 or 7. The version I tested with before was 2.44, no idea why was it so important to suddenly change the versioning scheme like this. --- diff --git a/documentation/test_doxygen/contents_dot/index-2.html b/documentation/test_doxygen/contents_dot/index-2.html new file mode 100644 index 00000000..7ebadebf --- /dev/null +++ b/documentation/test_doxygen/contents_dot/index-2.html @@ -0,0 +1,132 @@ + + + + + My Project + + + + + +
+
+
+
+
+

+ My Project +

+

Note: the test uses DejaVu Sans instead of Source Sans Pro in order to have predictable rendering on the CIs.

+ +Basics + +a + +a + + +b + + +b + + +a->b + + + + +c + +c + + +b->c + + +0 + + +c->c + + +1 + + + +
+ +Colors + +a + +a + + +b + +b + + +a->b + + +yes + + +b->b + + +no + + + +
+ + +a + +a + + +b + +b + + +a--b + + + + +
A graph
+ + +a + +a + + +b + +b + + +a--b + + + + +
A graph
+
+
+
+
+ + diff --git a/documentation/test_doxygen/contents_dot/index.html b/documentation/test_doxygen/contents_dot/index.html index 7ebadebf..e7495d90 100644 --- a/documentation/test_doxygen/contents_dot/index.html +++ b/documentation/test_doxygen/contents_dot/index.html @@ -22,104 +22,104 @@

My Project

-

Note: the test uses DejaVu Sans instead of Source Sans Pro in order to have predictable rendering on the CIs.

- +

Note: the test uses DejaVu Sans instead of Source Sans Pro in order to have predictable rendering on the CIs.

+ Basics a - -a + +a b - - -b + + +b a->b - - + + c - -c + +c b->c - - -0 + + +0 c->c - - -1 + + +1 -
- +
+ Colors a - -a + +a b - -b + +b a->b - - -yes + + +yes b->b - - -no + + +no -
- +
+ a - -a + +a b - -b + +b a--b - + -
A graph
- +
A graph
+ a - -a + +a b - -b + +b a--b - + diff --git a/documentation/test_doxygen/test_contents.py b/documentation/test_doxygen/test_contents.py index 4035037c..206d9db7 100644 --- a/documentation/test_doxygen/test_contents.py +++ b/documentation/test_doxygen/test_contents.py @@ -443,9 +443,13 @@ class Dot(IntegrationTestCase): def test(self): self.run_doxygen(wildcard='indexpage.xml') + # The damn thing adopted Chrome versioning apparently. No idea if the + # output changed in version 7, 8 or 9 already. + if parse_version(dot_version()) >= parse_version("10.0"): + file = 'page.html' # Used to be >= 2.44.0, but 2.42.2 appears to have the same output - if parse_version(dot_version()) >= parse_version("2.42.2"): - file = 'index.html' + elif parse_version(dot_version()) >= parse_version("2.42.2"): + file = 'index-2.html' else: file = 'index-240.html' diff --git a/documentation/test_python/page_plugins/dot-2.html b/documentation/test_python/page_plugins/dot-2.html new file mode 100644 index 00000000..289e5ab7 --- /dev/null +++ b/documentation/test_python/page_plugins/dot-2.html @@ -0,0 +1,61 @@ + + + + + Dot | My Python Project + + + + + +
+
+
+
+
+

+ Dot +

+
+ + + +a + +a + + +b + +b + + +a->b + + + + +c + +c + + +b->c + + + + + +
+
+
+
+
+ + diff --git a/documentation/test_python/page_plugins/dot.html b/documentation/test_python/page_plugins/dot.html index 289e5ab7..9b9cdd2d 100644 --- a/documentation/test_python/page_plugins/dot.html +++ b/documentation/test_python/page_plugins/dot.html @@ -23,32 +23,32 @@ Dot
- - + + a - -a + +a b - -b + +b a->b - - + + c - -c + +c b->c - - + + diff --git a/documentation/test_python/test_page.py b/documentation/test_python/test_page.py index 941665f4..bf6165b4 100644 --- a/documentation/test_python/test_page.py +++ b/documentation/test_python/test_page.py @@ -81,9 +81,13 @@ class Plugins(BaseTestCase): }) self.assertEqual(*self.actual_expected_contents('index.html')) - # Used to be >= 2.44.0, but 2.42.2 appears to have the same output - if parse_version(dot_version()) >= parse_version("2.42.2"): + # The damn thing adopted Chrome versioning apparently. No idea if the + # output changed in version 7, 8 or 9 already. + if parse_version(dot_version()) >= parse_version("10.0"): file = 'dot.html' + # Used to be >= 2.44.0, but 2.42.2 appears to have the same output + elif parse_version(dot_version()) >= parse_version("2.42.2"): + file = 'dot-2.html' else: file = 'dot-240.html' self.assertEqual(*self.actual_expected_contents('dot.html', file)) diff --git a/plugins/m/test/dot/page-2.html b/plugins/m/test/dot/page-2.html new file mode 100644 index 00000000..32c7f6ab --- /dev/null +++ b/plugins/m/test/dot/page-2.html @@ -0,0 +1,353 @@ + + + + + m.dot | A Pelican Blog + + + + + + +
+
+
+
+
+
+

m.dot

+ +

Note: the test uses DejaVu Sans instead of Source Sans Pro in order to have +predictable rendering on the CIs.

+

Different shapes, fills etc. All default colors, filled only the first node +and the arrowheads, nothing else. Non-default font size should be preserved.

+
+ + +Basics + +a + +a + + +b + + +b + + +a->b + + + + +c + +c + + +b->c + + +0 + + +c->c + + +1 + + + +
+
+ + +More shapes + +d +outsider + + + +
+

Colors:

+
+ + +Colors + +a + +a + + +b + +b + + +a->b + + +yes + + +b->b + + +no + + + +
+

Unoriented graph without a title:

+
+ + + +a + +a + + +b + +b + + +a--b + + + +a--b + + + + +
+

Strict graphs:

+
+ + +A to B + +a + +a + + +b + +b + + +a->b + + + + + +
+
+ + +A to B + +a + +a + + +b + +b + + +a--b + + + + +
+

Structs:

+
+ + +Structs + +struct + +a + +b + +c + +d + +e + + +another + +a + +b + +c + +d + +e + + + +
+
+ + +A to B + +a + +a + + +b + +b + + +a->b + + + + + +
This is a title.
+

This is a description.

+
+
+
+
+ + + +a + +a + + +b + +b + + +a->b + + + + + +

The graph below should not be styled as a part of the figure:

+
+ + +A to B + +a + +a + + +b + +b + + +a->b + + + + + +
+
+

Subgraphs:

+
+ + + +cluster_Outer + +Outer + + +cluster_Inner + +Inner + + +A + +A + + +B + +B + + +A->B + + + + +C + +C + + +A->C + + + + +D + +D + + +B->D + + + + +B2 + +B2 + + +B2->B + + + + + +
+ +
+
+
+
+
+ + diff --git a/plugins/m/test/dot/page.html b/plugins/m/test/dot/page.html index 32c7f6ab..da5eeafd 100644 --- a/plugins/m/test/dot/page.html +++ b/plugins/m/test/dot/page.html @@ -28,207 +28,207 @@ predictable rendering on the CIs.

Different shapes, fills etc. All default colors, filled only the first node and the arrowheads, nothing else. Non-default font size should be preserved.

- - + + Basics a - -a + +a b - - -b + + +b a->b - - + + c - -c + +c b->c - - -0 + + +0 c->c - - -1 + + +1
- + More shapes d -outsider +outsider

Colors:

- - + + Colors a - -a + +a b - -b + +b a->b - - -yes + + +yes b->b - - -no + + +no

Unoriented graph without a title:

- - + + a - -a + +a b - -b + +b a--b - + a--b - +

Strict graphs:

- - + + A to B a - -a + +a b - -b + +b a->b - - + +
- - + + A to B a - -a + +a b - -b + +b a--b - +

Structs:

- - + + Structs struct - -a - -b - -c - -d - -e + +a + +b + +c + +d + +e another - -a - -b - -c - -d - -e + +a + +b + +c + +d + +e
- - + + A to B a - -a + +a b - -b + +b a->b - - + + @@ -238,44 +238,44 @@ and the arrowheads, nothing else. Non-default font size should be preserved.

- - + + a - -a + +a b - -b + +b a->b - - + +

The graph below should not be styled as a part of the figure:

- - + + A to B a - -a + +a b - -b + +b a->b - - + + @@ -283,62 +283,62 @@ and the arrowheads, nothing else. Non-default font size should be preserved.

Subgraphs:

- - + + cluster_Outer - -Outer + +Outer cluster_Inner - -Inner + +Inner A - -A + +A B - -B + +B A->B - - + + C - -C + +C A->C - - + + D - -D + +D B->D - - + + B2 - -B2 + +B2 B2->B - - + + diff --git a/plugins/m/test/test_dot.py b/plugins/m/test/test_dot.py index 3db606ae..48ca659c 100644 --- a/plugins/m/test/test_dot.py +++ b/plugins/m/test/test_dot.py @@ -42,9 +42,13 @@ class Dot(PelicanPluginTestCase): 'M_DOT_FONT': 'DejaVu Sans' }) - # Used to be >= 2.44.0, but 2.42.2 appears to have the same output - if parse_version(dot_version()) >= parse_version("2.42.2"): + # The damn thing adopted Chrome versioning apparently. No idea if the + # output changed in version 7, 8 or 9 already. + if parse_version(dot_version()) >= parse_version("10.0"): file = 'page.html' + # Used to be >= 2.44.0, but 2.42.2 appears to have the same output + elif parse_version(dot_version()) >= parse_version("2.42.2"): + file = 'page-2.html' else: file = 'page-240.html'