Skip to content

Remove various Python 2.6 related workarounds #5373

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 8 commits into from
Nov 5, 2015
Prev Previous commit
Remove missing assert_less workaround from spines test
  • Loading branch information
jenshnielsen committed Oct 31, 2015
commit dc7debce0aeeee0b49caa906da9a5a374984d48e
8 changes: 3 additions & 5 deletions lib/matplotlib/tests/test_spines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unicode_literals)

import numpy as np
from nose.tools import assert_true
from nose.tools import assert_true, assert_less
from matplotlib.externals import six

import matplotlib
Expand Down Expand Up @@ -71,13 +71,11 @@ def test_label_without_ticks():
spine = ax.spines['left']
spinebbox = spine.get_transform().transform_path(
spine.get_path()).get_extents()
# replace with assert_less if >python2.6
assert_true(ax.yaxis.label.get_position()[0] < spinebbox.xmin,
assert_less(ax.yaxis.label.get_position()[0], spinebbox.xmin,
"Y-Axis label not left of the spine")

spine = ax.spines['bottom']
spinebbox = spine.get_transform().transform_path(
spine.get_path()).get_extents()
# replace with assert_less if >python2.6
assert_true(ax.xaxis.label.get_position()[1] < spinebbox.ymin,
assert_less(ax.xaxis.label.get_position()[1], spinebbox.ymin,
"X-Axis label not below the spine")