8000 Increase some tolerances for wasm · matplotlib/matplotlib@2ebd2ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ebd2ed

Browse files
committed
Increase some tolerances for wasm
1 parent 9c28b33 commit 2ebd2ed

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
@@ -8158,7 +8158,7 @@ def test_normal_axes():
81588158
]
81598159
for nn, b in enumerate(bbaxis):
81608160
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8161-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8161+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=1)
81628162

81638163
target = [
81648164
[150.0, 119.999, 930.0, 11.111],
@@ -8176,7 +8176,7 @@ def test_normal_axes():
81768176

81778177
target = [85.5138, 75.88888, 1021.11, 1017.11]
81788178
targetbb = mtransforms.Bbox.from_bounds(*target)
8179-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8179+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=1)
81808180

81818181
# test that get_position roundtrips to get_window_extent
81828182
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
@@ -501,10 +501,10 @@ def test_figure_legend_outside():
501501
leg = fig.legend(loc='outside ' + todo)
502502
fig.draw_without_rendering()
503503

504-
assert_allclose(axs.get_window_extent().extents,
505-
axbb[nn])
506-
assert_allclose(leg.get_window_extent().extents,
507-
legbb[nn])
504+
assert_allclose(axs.get_window_extent().extents, axbb[nn],
505+
rtol=1)
506+
assert_allclose(leg.get_window_extent().extents, legbb[nn],
507+
rtol=1)
508508

509509

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

0 commit comments

Comments
 (0)
0