Skip to content

Commit 358733e

Browse files
committed
Increase some tolerances for wasm
1 parent 3d2f2a6 commit 358733e

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
@@ -8289,7 +8289,7 @@ def test_normal_axes():
82898289
]
82908290
for nn, b in enumerate(bbaxis):
82918291
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8292-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8292+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)
82938293

82948294
target = [
82958295
[150.0, 119.999, 930.0, 11.111],
@@ -8307,7 +8307,7 @@ def test_normal_axes():
83078307

83088308
target = [85.5138, 75.88888, 1021.11, 1017.11]
83098309
targetbb = mtransforms.Bbox.from_bounds(*target)
8310-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8310+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)
83118311

83128312
# test that get_position roundtrips to get_window_extent
83138313
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)