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

Skip to content

Commit 75bebef

Browse files
committed
Stop handling GeneratorExit in nose image comparison.
While this does cause a periodic printout if using the image_comparison decorator from nose, trying to handle this exception means that test images don't get checked at all, which is even worse.
1 parent fd8e844 commit 75bebef

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,8 @@ def __call__(self, func):
330330

331331
@nose.tools.with_setup(self.setup, self.teardown)
332332
def runner_wrapper():
333-
try:
334-
for case in self.nose_runner():
335-
yield case
336-
except GeneratorExit:
337-
# nose bug...
338-
self.teardown()
333+
for case in self.nose_runner():
334+
yield case
339335

340336
return _copy_metadata(func, runner_wrapper)
341337

0 commit comments

Comments
 (0)