Fix Matplotlib Coverage Test Failures

This aspect of CI is failing. Please fix the CI or the failing tests. Run python -m pytest -m "render and not external_tool" --strict-config --strict-markers --timeout=120 ============================= test session starts ============================== platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 rootdir: /home/runner/work/postgkyl/postgkyl configfile: pyproject.toml testpaths: tests plugins: cov-7.1.0, anyio-4.15.0, timeout-2.4.0 timeout: 120.0s timeout method: signal timeout func_only: False collected 1937 items / 1599 deselected / 338 selected
tests/test_render_animate.py .............................. [ 8%] tests/test_render_ffmpeg.py ..... [ 10%] tests/test_render_labels.py .............. [ 14%] tests/test_render_matplotlib.py ........................................ [ 26%] ..........ss..................... [ 36%] tests/test_render_matplotlib_coverage.py ..........................FF... [ 45%] ........................................................ [ 61%] tests/test_render_plotly.py ............................................ [ 74%] ........................ [ 81%] tests/test_render_prep.py ........................... [ 89%] tests/test_render_pyvista.py ...s..............s......... [ 98%] tests/test_render_style.py ...... [100%]
=================================== FAILURES =================================== ____________ TestRcParamNovelties.test_xkcd_flag_invokes_xkcd_mode _____________
self = <test_render_matplotlib_coverage.TestRcParamNovelties object at 0x7f87617903e0>
tests/test_render_matplotlib_coverage.py:196:
src/postgkyl/render/matplotlib.py:598: in plot xkcd_cm, xkcd_rc = get_xkcd_safely() ^^^^^^^^^^^^^^^^^
E UserWarning: No xkcd-style font found (xkcd/xkcd Script/Comic Neue/Comic Sans MS); falling back to the default sans-serif font.
src/postgkyl/render/matplotlib.py:187: UserWarning ____ TestRcParamNovelties.test_xkcd_flag_does_not_leak_into_global_rcparams ____
self = <test_render_matplotlib_coverage.TestRcParamNovelties object at 0x7f8761733e00>
tests/test_render_matplotlib_coverage.py:204:
src/postgkyl/render/matplotlib.py:598: in plot xkcd_cm, xkcd_rc = get_xkcd_safely() ^^^^^^^^^^^^^^^^^
E UserWarning: No xkcd-style font found (xkcd/xkcd Script/Comic Neue/Comic Sans MS); falling back to the default sans-serif font.
src/postgkyl/render/matplotlib.py:187: UserWarning =========================== short test summary info ============================ SKIPPED [1] tests/test_render_matplotlib.py:543: no compiled Gkeyll (libg0core.so) found SKIPPED [1] tests/test_render_matplotlib.py:554: no compiled Gkeyll (libg0core.so) found SKIPPED [1] tests/test_render_pyvista.py:73: could not import 'trame_vtk': No module named 'trame_vtk' SKIPPED [1] tests/test_render_pyvista.py:128: could not import 'trame_vtk': No module named 'trame_vtk' FAILED tests/test_render_matplotlib_coverage.py::TestRcParamNovelties::test_xkcd_flag_invokes_xkcd_mode - UserWarning: No xkcd-style font found (xkcd/xkcd Script/Comic Neue/Comic Sans MS); falling back to the default sans-serif font. FAILED tests/test_render_matplotlib_coverage.py::TestRcParamNovelties::test_xkcd_flag_does_not_leak_into_global_rcparams - UserWarning: No xkcd-style font found (xkcd/xkcd Script/Comic Neue/Comic Sans MS); falling back to the default sans-serif font. ========== 2 failed, 332 passed, 4 skipped, 1599 deselected in 24.88s ========== Error: Process completed with exit code 1.
I’ll trace the xkcd fallback and the repository’s warning policy, then make the smallest behavior/test adjustment and rerun the exact render CI command.
The fallback warning is intentional and already has a dedicated test. The two failing tests exercise rc-context behavior, but they accidentally depend on whether the runner has a comic font installed. I’m isolating those tests from that environment-specific warning while preserving the warning contract itself.
The exact CI slice is now running. The change is test-local, so the library still warns when xkcd fonts are unavailable, and the dedicated fallback test still verifies that behavior.
The render suite passes. I also detected unrelated staged test changes appearing in the shared worktree during the run; I’m checking the final diff carefully so I report only this fix and do not disturb anyone else’s work.
Fixed the font-dependent failures by filtering the intentional xkcd fallback warning in the two rcParams tests: test_render_matplotlib_coverage.py.
Exact CI command now passes: 336 passed, 2 skipped.