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

Skip to content

Fix numpy version tests to use Looseversion #6490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from distutils.version import LooseVersion

import six
from six.moves import xrange
Expand Down Expand Up @@ -84,7 +85,7 @@ def test_formatter_ticker():

@image_comparison(baseline_images=["formatter_large_small"])
def test_formatter_large_small():
if tuple(map(int, np.__version__.split('.'))) >= (1, 11, 0):
if LooseVersion(np.__version__) >= LooseVersion('1.11.0'):
raise KnownFailureTest("Fall out from a fixed numpy bug")
# github issue #617, pull #619
fig, ax = plt.subplots(1)
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_bbox_tight.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from distutils.version import LooseVersion

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