8000 TST: Removed test_spines.py from pep8 excluded list since it is passi… · matplotlib/matplotlib@f49a5b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit f49a5b6

Browse files
committed
TST: Removed test_spines.py from pep8 excluded list since it is passing pep8 now. Modified test_spines to not use assert_less since it is not available in python 2.6
1 parent 407e362 commit f49a5b6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ def test_pep8_conformance_installed_files():
213213
'tests/test_mathtext.py',
214214
'tests/test_rcparams.py',
215215
'tests/test_simplification.py',
216-
'tests/test_spines.py',
217216
'tests/test_streamplot.py',
218217
'tests/test_subplots.py',
219218
'tests/test_tightlayout.py',

lib/matplotlib/tests/test_spines.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
unicode_literals)
33

44
import numpy as np
5-
from nose.tools import assert_less
5+
from nose.tools import assert_true
66
import six
77

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

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

0 commit comments

Comments
 (0)
0