Skip to content
Prev Previous commit
Next Next commit
Increase some tolerances for wasm
  • Loading branch information
QuLogic committed Mar 19, 2026
commit 78a60001071db7cbc767d0416f9d9ac96af0b4b0
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8530,7 +8530,7 @@ def test_normal_axes():
]
for nn, b in enumerate(bbaxis):
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)

>
[150.0, 119.999, 930.0, 11.111],
Expand All @@ -8548,7 +8548,7 @@ def test_normal_axes():

75.88888, 1021.11, 1017.11]
targetbb = mtransforms.Bbox.from_bounds(*target)
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)

# test that get_position roundtrips to get_window_extent
axbb = ax.get_position().transformed(fig.transFigure).bounds
Expand Down
8 changes: 4 additions & 4 deletions lib/matplotlib/tests/test_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,10 @@ def test_figure_legend_outside():
leg = fig.legend(loc='outside ' + todo)
fig.draw_without_rendering()

assert_allclose(axs.get_window_extent().extents,
axbb[nn])
assert_allclose(leg.get_window_extent().extents,
legbb[nn])
assert_allclose(axs.get_window_extent().extents, axbb[nn],
rtol=1e-4)
assert_allclose(leg.get_window_extent().extents, legbb[nn],
rtol=1e-4)


@image_comparison(['legend_stackplot.png'],
Expand Down
Loading