Skip to content

Commit 544303f

Browse files
committed
More testing by registering mplcairo as default backend for all formats.
1 parent 7a903b8 commit 544303f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

run-mpl-test-suite.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def _raise_on_image_difference(expected, actual, tol):
7676
mplcairo.base.GraphicsContextRendererCairo
7777
mpl.backends.backend_agg = \
7878
sys.modules["matplotlib.backends.backend_agg"] = mplcairo.base
79+
mpl.backend_bases._default_backends = {
80+
k: "mplcairo.base" for k in mpl.backend_bases._default_backends}
7981

8082
with warnings.catch_warnings(record=True): # mpl 3.0
8183
mpl.use("agg", force=True)
@@ -165,6 +167,9 @@ def pytest_collection_modifyitems(session, config, items):
165167
"test_backend_ps.py::test_colorbar_shift[",
166168
# cairo doesn't support setting fonttype.
167169
"test_backend_ps.py::test_fonttype[",
170+
# FIXME[Upstream]: Test is not precise enough re: name reuse
171+
# due to cairo's font subsetting approach.
172+
"test_backend_ps.py::test_no_duplicate_definition",
168173
# We're fine with partial usetex.
169174
"test_backend_ps.py::test_partial_usetex",
170175
# We do not support writing PS to text-mode streams.
@@ -194,12 +199,16 @@ def pytest_collection_modifyitems(session, config, items):
194199
"test_backend_svg.py::test_svg_incorrect_metadata[",
195200
"test_backend_svg.py::test_svg_metadata",
196201
"test_backend_svg.py::test_svgid",
202+
"test_figure.py::test_not_visible_figure",
197203
# cairo always emits text as glyph paths.
198204
"test_backend_svg.py::test_svgnone_with_data_coordinates",
199205
# cairo can't emit urls in SVG.
200206
"test_backend_svg.py::test_text_urls",
201207
"test_backend_svg.py::test_url",
202208
"test_backend_svg.py::test_url_tick",
209+
# cairo elides fully-clipped artists
210+
# FIXME[Upstream]: clip paths in test should be fixed.
211+
"test_backend_svg.py::test_clip_path_ids_reuse",
203212
# Different tight bbox.
204213
"test_bbox_tight.py::test_bbox_inches_tight_suptile_legend[",
205214
"test_bbox_tight.py::test_bbox_inches_tight_suptitle_non_default[",

0 commit comments

Comments
 (0)