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

Skip to content

Commit 67f9d6b

Browse files
authored
Merge pull request matplotlib#31516 from rcomer/minver-flake
TST: account for flakiness with Numpy v1 (part 3)
2 parents 51a3541 + d35adbd commit 67f9d6b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/tests/test_contour.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from matplotlib.colors import LogNorm, same_color
1212
import matplotlib.patches as mpatches
1313
from matplotlib.testing.decorators import check_figures_equal, image_comparison
14+
from packaging.version import parse as parse_version
1415
import pytest
1516

1617

@@ -256,7 +257,8 @@ def test_contour_datetime_axis():
256257

257258
@image_comparison(['contour_test_label_transforms.png'],
258259
remove_text=True, style='mpl20',
259-
tol=0 if platform.machine() == 'x86_64' else 0.005)
260+
tol=1 if parse_version(np.version.version).major < 2 else
261+
0 if platform.machine() == 'x86_64' else 0.005)
260262
def test_labels():
261263
# Adapted from pylab_examples example code: contour_demo.py
262264
# see issues #2475, #2843, and #2818 for explanation

0 commit comments

Comments
 (0)