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 4d0e2c5

Browse filesBrowse files
committed
STY: import matplotlib.lines as mlines
1 parent 2f65b5b commit 4d0e2c5
Copy full SHA for 4d0e2c5

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-4
lines changed

‎lib/matplotlib/tests/test_lines.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_lines.py
+5-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.