xflr6 / graphviz

Simple Python interface for Graphviz
https://graphviz.readthedocs.io
MIT License
1.65k stars 213 forks source link

[0.19.1] test suite fails running against pango 1.50.0 #153

Closed DimStar77 closed 2 years ago

DimStar77 commented 2 years ago

The test suite fails when running against pango 1.50.0:

[   56s] =========================== short test summary info ============================
[   56s] FAILED tests/test_graphs.py::test_subgraph_render[Graph-...] - assert Capture...
[   56s] FAILED tests/test_graphs.py::test_subgraph_render[Digraph-...] - assert Captu...
[   56s] FAILED tests/backend/test_piping.py::test_pipe[dot-svg-None-None-(?s)^<\\?xml .+</svg>\\s*$]
[   56s] FAILED tests/backend/test_piping.py::test_pipe[dot-ps-ps-core-%!PS-] - assert...
[   56s] FAILED tests/backend/test_piping.py::test_pipe[sfdp-svg-None-None-(?s)^<\\?xml .+</svg>\\s*$]
[   56s] FAILED tests/backend/test_rendering.py::test_render[dot-pdf-None-None-pdf] - ...
[   56s] FAILED tests/backend/test_rendering.py::test_render[dot-plain-dot-core-core.dot.plain]
[   56s] FAILED tests/backend/test_rendering.py::test_render_img - assert CaptureResul...
[   56s] FAILED tests/backend/test_rendering.py::test_render_outfile_differnt_parent
[   56s] ======================== 9 failed, 318 passed in 11.82s ========================

Some more complete log, incl. some backtraces from the test suite, can be found at https://build.opensuse.org/build/home:dimstar:Factory/Staging_L/x86_64/python-graphviz/_log

DimStar77 commented 2 years ago

mainly:

[   56s] E         +CaptureResult(out='', err="\n(process:1869): Pango-CRITICAL **: 09:41:00.803: pango_font_describe: assertion 'font != NULL' failed\n\n(process:1869): Pango-CRITICAL **: 09:41:00.804: pango_font_description_get_variant: assertion 'desc != NULL' failed\n")

(could as well be pango itself of course - just busy getting out of the system how we interact with pang)

xflr6 commented 2 years ago

Thanks.

Side note that the log link gives me: Anonymous user is not allowed here - please login

This seems like an upstream issue, I think you need to report it there (see also upstream build instructions).

DimStar77 commented 2 years ago

in case anybody comes here through search, for having the same issue, I report also the solution:

The issue was that my buildroot was 'too restricted', i.e. not a single font had been installed to /usr/share/fonts/truetype; pango 1.50 no longer seems to like that

Adding any font (I used noto-sans-fonts) makes this all work