Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dede0df

Browse filesBrowse files
committed
Fix numpy version tests to use Looseversion
1 parent b572f64 commit dede0df
Copy full SHA for dede0df

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
3+
from distutils.version import LooseVersion
34

45
import six
56
from six.moves import xrange
@@ -84,7 +85,7 @@ def test_formatter_ticker():
8485

8586
@image_comparison(baseline_images=["formatter_large_small"])
8687
def test_formatter_large_small():
87-
if tuple(map(int, np.__version__.split('.'))) >= (1, 11, 0):
88+
if LooseVersion(np.__version__) >= LooseVersion('1.11.0'):
8889
raise KnownFailureTest("Fall out from a fixed numpy bug")
8990
# github issue #617, pull #619
9091
fig, ax = plt.subplots(1)

‎lib/matplotlib/tests/test_bbox_tight.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_bbox_tight.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
3+
from distutils.version import LooseVersion
34

45
from matplotlib.externals import six
56
from matplotlib.externals.six.moves import xrange
@@ -91,7 +92,7 @@ def test_bbox_inches_tight_clipping():
9192
remove_text=True, savefig_kwarg={'bbox_inches': 'tight'})
9293
def test_bbox_inches_tight_raster():
9394
"""Test rasterization with tight_layout"""
94-
if tuple(map(int, np.__version__.split('.'))) >= (1, 11, 0):
95+
if LooseVersion(np.__version__) >= LooseVersion('1.11.0'):
9596
raise KnownFailureTest("Fall out from a fixed numpy bug")
9697
fig = plt.figure()
9798
ax = fig.add_subplot(111)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.