8000 STY: import matplotlib.lines as mlines · notmatthancock/matplotlib@4d0e2c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d0e2c5

Browse files
committed
STY: import matplotlib.lines as mlines
1 parent 2f65b5b commit 4d0e2c5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matplotlib/tests/test_lines.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
from matplotlib.externals import six
88

9+
import matplotlib.lines as mlines
910
import nose
1011
from nose.tools import assert_true, assert_raises
1112
from timeit import repeat
1213
import numpy as np
13-
import matplotlib as mpl
14+
1415
import matplotlib.pyplot as plt
1516
from matplotlib.testing.decorators import cleanup, image_comparison
1617
import sys
@@ -38,7 +39,7 @@ def test_invisible_Line_rendering():
3839
ax = plt.subplot(111)
3940

4041
# Create a "big" Line instance:
41-
l = mpl.lines.Line2D(x,y)
42+
l = mlines.Line2D(x,y)
4243
l.set_visible(False)
4344
# but don't add it to the Axis instance `ax`
4445

@@ -112,7 +113,7 @@ def test_valid_linestyles():
112113
raise nose.SkipTest("assert_raises as context manager "
113114
"not supported with Python < 2.7")
114115

115-
line = mpl.lines.Line2D([], [])
116+
line = mlines.Line2D([], [])
116117
with assert_raises(ValueError):
117118
line.set_linestyle('aardvark')
118119

@@ -128,7 +129,7 @@ def test_set_line_coll_dash_image():
128129

129130
def test_nan_is_sorted():
130131
# Exercises issue from PR #2744 (NaN throwing warning in _is_sorted)
131-
line = mpl.lines.Line2D([],[])
132+
line = mlines.Line2D([],[])
132133
assert_true(line._is_sorted(np.array([1,2,3])))
133134
assert_true(not line._is_sorted(np.array([1,np.nan,3])))
134135

0 commit comments

Comments
 (0)
0