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

Skip to content

Commit c40a624

Browse files
gpoulterstefanv
authored andcommitted
Replaced try-except-else with try-finally
Bare except clause is an error in Python 3 and not used in the test as the exception is simply re-raised.
1 parent 9db64a8 commit c40a624

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/matplotlib/tests/test_simplification.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def test_start_with_moveto():
174174
@raises(OverflowError)
175175
def test_throw_rendering_complexity_exceeded():
176176
rcParams['path.simplify'] = False
177-
178177
xx = np.arange(200000)
179178
yy = np.random.rand(200000)
180179
yy[1000] = np.nan
@@ -183,9 +182,7 @@ def test_throw_rendering_complexity_exceeded():
183182
ax.plot(xx, yy)
184183
try:
185184
fig.savefig(io.StringIO())
186-
except e:
187-
raise e
188-
else:
185+
finally:
189186
rcParams['path.simplify'] = True
190187

191188
@image_comparison(baseline_images=['clipper_edge'])

0 commit comments

Comments
 (0)