Skip to content

TST: Reset tolerances on tests changed by text overhaul#31303

Merged
tacaswell merged 1 commit into
matplotlib:text-overhaulfrom
QuLogic:reset-tolerance
Apr 8, 2026
Merged

TST: Reset tolerances on tests changed by text overhaul#31303
tacaswell merged 1 commit into
matplotlib:text-overhaulfrom
QuLogic:reset-tolerance

Conversation

@QuLogic

@QuLogic QuLogic commented Mar 14, 2026

Copy link
Copy Markdown
Member

PR summary

Now that these have been regenerated, we can reset the tolerances. It is possible that we may still need some architecture-specific tolerances; I will restore them if we find that to be the case in CI here.

Only the last commit is relevant here.

AI Disclosure

None

PR checklist

@QuLogic

QuLogic commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

I've gone through the results.

All tests pass on x86_64 Ubuntu, except for the following, which fail everywhere and probably just weren't updated recently due to the existing tolerance:

Ubuntu (x86_64) Ubuntu 3.12 ARM macOS (all) Windows (all)
test_figure.py::test_align_titles[png] 0.008 0.002 0.013 0.008
test_axes3d.py::test_scale3d_artists_log[png] 0.028 0.028 0.031 0.028

All others pass on Windows as well, except for 1 test everywhere and 3 tests on AppVeyor only:

Windows (all Azure) Windows AppVeyor
test_patheffects.py::test_collection[png] 0.006 0.006
test_axes3d.py::TestVoxels.test_xyz[png] 0.001
test_axes_grid1.py::test_anchored_direction_arrows[png] 0.001
test_axes_grid1.py::test_anchored_direction_arrows_many_args[png] 0.001

On Ubuntu ARM and macOS (all ARM/M1 now, I believe), the following also fail:

Ubuntu 3.12 ARM macOS (all)
test_axes.py::test_canonical[png] 0.028
test_axes.py::test_contour_colorbar[pdf] 0.532 0.532
test_axes.py::test_contour_colorbar[png] 0.012 0.012
test_axes.py::test_contour_colorbar[svg] 0.130 0.130
test_axes.py::test_eb_line_zorder[png] 0.018
test_axes.py::test_formatter_ticker[png] 0.022
test_axes.py::test_imshow_clip[pdf] 1.238 1.238
test_axes.py::test_imshow_clip[png] 0.009 0.009
test_axes.py::test_imshow_clip[svg] 0.275 0.275
test_axes.py::test_markers_fillstyle_rcparams[png] 0.032
test_axes.py::test_pie_center_radius[png] 0.007
test_axes.py::test_preset_clip_paths[png] 0.007
test_axes.py::test_secondary_xy[png] 0.009 0.023
test_axes.py::test_set_get_ticklabels[png] 0.029
test_bbox_tight.py::test_bbox_inches_tight_suptile_legend[png] 0.021
test_contour.py::test_labels[png] 0.004 0.004
test_figure.py::test_align_labels[png] 0.001 0.008
test_figure.py::test_figure[png] 0.021
test_figure.py::test_subfigure_ss[png] 0.021
test_image.py::test_downsampling[png] 0.068 0.068
test_legend.py::test_alpha_rcparam[png] 0.012 0.025
test_legend.py::test_alpha_rgba[png] 0.012 0.025
test_legend.py::test_fancy[png] 0.007
test_legend.py::test_framealpha[png] 0.018 0.020
test_legend.py::test_labels_first[png] 0.014
test_legend.py::test_multiple_keys[png] 0.032
test_legend.py::test_shadow_argument_types[png] 0.027
test_patheffects.py::test_collection[png] 0.020 0.031
test_patheffects.py::test_patheffect2[png] 0.050
test_patheffects.py::test_patheffect3[png] 0.019
test_polar.py::test_polar_annotations[png] 0.008
test_polar.py::test_polar_coord_annotations[png] 0.012
test_subplots.py::test_subplots_offsettext[png] 0.013 0.027
test_units.py::test_numpy_facade[png] 0.002 0.022
mplot3d
test_axes3d.py::test_axes3d_primary_views[png] 0.044
test_axes3d.py::test_errorbar3d[png] 0.014
test_axes3d.py::test_stem3d[png] 0.001 0.007
test_legend3d.py::test_fancy[png] 0.009
axes_grid1
test_axes_grid1.py::test_anchored_direction_arrows[png] 0.003 0.005
test_axes_grid1.py::test_zooming_with_inverted_axes[png] 0.022
axisartist
test_grid_helper_curvelinear.py::test_custom_transform[png] 0.037 0.039

We knew from #31343 and #31300 (comment) that we needed to keep a few tolerances (6 and 3 from each, respectively) already. I will restore the tolerances on the remaining ones shortly.

@QuLogic

QuLogic commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

All tests pass on x86_64 Ubuntu, except for the following, which fail everywhere and probably just weren't updated recently due to the existing tolerance:

After updating these to pass with zero tolerance on x86_64, they now fail on other platforms as the following:

Ubuntu (x86_64) Ubuntu 3.12 ARM macOS (all) Windows (all)
test_figure.py::test_align_titles[png] 0 0.002 0.013 0
test_axes3d.py::test_scale3d_artists_log[png] 0 0.005 0.015 0.003

I will modify the tolerances for these two accordingly.

@QuLogic QuLogic force-pushed the reset-tolerance branch 2 times, most recently from e5aad70 to de6b5b3 Compare April 7, 2026 04:51
@QuLogic

QuLogic commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

Also noticed a few new tests in lib/mpl_toolkits/axisartist/tests/test_axis_artist.py that could have their tolerance reset.

@QuLogic QuLogic marked this pull request as ready for review April 7, 2026 18:36
@QuLogic QuLogic moved this from Waiting for other PR to Ready for Review in Font and text overhaul Apr 7, 2026
@tacaswell tacaswell merged commit ba56e3d into matplotlib:text-overhaul Apr 8, 2026
37 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Font and text overhaul Apr 8, 2026
@QuLogic QuLogic deleted the reset-tolerance branch April 8, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants