Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78a6000

Browse files
committed
Increase some tolerances for wasm
1 parent 1af3ee7 commit 78a6000

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8530,7 +8530,7 @@ def test_normal_axes():
85308530
]
85318531
for nn, b in enumerate(bbaxis):
85328532
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8533-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8533+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)
85348534

85358535
target = [
85368536
[150.0, 119.999, 930.0, 11.111],
@@ -8548,7 +8548,7 @@ def test_normal_axes():
85488548

85498549
target = [85.5138, 75.88888, 1021.11, 1017.11]
85508550
targetbb = mtransforms.Bbox.from_bounds(*target)
8551-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8551+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)
85528552

85538553
# test that get_position roundtrips to get_window_extent
85548554
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
@@ -522,10 +522,10 @@ def test_figure_legend_outside():
522522
leg = fig.legend(loc='outside ' + todo)
523523
fig.draw_without_rendering()
524524

525-
assert_allclose(axs.get_window_extent().extents,
526-
axbb[nn])
527-
assert_allclose(leg.get_window_extent().extents,
528-
legbb[nn])
525+
assert_allclose(axs.get_window_extent().extents, axbb[nn],
526+
rtol=1e-4)
527+
assert_allclose(leg.get_window_extent().extents, legbb[nn],
528+
rtol=1e-4)
529529

530530

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

0 commit comments

Comments
 (0)