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

Skip to content

Commit 519b6a1

Browse files
Update test_lines.py
Add a test for setting drawstyle after line creation, remove whitespaces to satisfy the PEP gods.
1 parent e3d4e5f commit 519b6a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/tests/test_lines.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_valid_drawstyles():
129129
with pytest.raises(ValueError):
130130
line.set_drawstyle('foobar')
131131

132-
132+
133133
def test_set_drawstyle():
134134
x = np.linspace(0, 2*np.pi, 10)
135135
y = np.sin(x)
@@ -138,10 +138,11 @@ def test_set_drawstyle():
138138
line, = ax.plot(x, y)
139139
line.set_drawstyle("steps-pre")
140140
assert len(line.get_path().vertices) == 2*len(x)-1
141-
141+
142142
line.set_drawstyle("default")
143143
assert len(line.get_path().vertices) == len(x)
144144

145+
145146
@image_comparison(baseline_images=['line_collection_dashes'], remove_text=True)
146147
def test_set_line_coll_dash_image():
147148
fig = plt.figure()

0 commit comments

Comments
 (0)