Skip to content

Commit ad4dfda

Browse files
committed
Increase some tolerances for wasm
1 parent 754c7e8 commit ad4dfda

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8302,7 +8302,7 @@ def test_normal_axes():
83028302
]
83038303
for nn, b in enumerate(bbaxis):
83048304
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8305-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8305+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)
83068306

83078307
target = [
83088308
[150.0, 119.999, 930.0, 11.111],
@@ -8320,7 +8320,7 @@ def test_normal_axes():
83208320

83218321
target = [85.5138, 75.88888, 1021.11, 1017.11]
83228322
targetbb = mtransforms.Bbox.from_bounds(*target)
8323-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8323+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)
83248324

83258325
# test that get_position roundtrips to get_window_extent
83268326
axbb = ax.get_position().transformed(fig.transFigure).bounds

lib/matplotlib/tests/test_legend.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ def test_figure_legend_outside():
513513
leg = fig.legend(loc='outside ' + todo)
514514
fig.draw_without_rendering()
515515

516-
assert_allclose(axs.get_window_extent().extents,
517-
axbb[nn])
518-
assert_allclose(leg.get_window_extent().extents,
519-
legbb[nn])
516+
assert_allclose(axs.get_window_extent().extents, axbb[nn],
517+
rtol=1e-4)
518+
assert_allclose(leg.get_window_extent().extents, legbb[nn],
519+
rtol=1e-4)
520520

521521

522522
@image_comparison(['legend_stackplot.png'],

0 commit comments

Comments
 (0)