Skip to content

Commit 5eb8a42

Browse files
committed
Increase some tolerances for wasm
1 parent e35fc24 commit 5eb8a42

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
@@ -8277,7 +8277,7 @@ def test_normal_axes():
82778277
]
82788278
for nn, b in enumerate(bbaxis):
82798279
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8280-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8280+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)
82818281

82828282
target = [
82838283
[150.0, 119.999, 930.0, 11.111],
@@ -8295,7 +8295,7 @@ def test_normal_axes():
82958295

82968296
target = [85.5138, 75.88888, 1021.11, 1017.11]
82978297
targetbb = mtransforms.Bbox.from_bounds(*target)
8298-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8298+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)
82998299

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