Skip to content

Commit 80be853

Browse files
committed
Merge pull request #6022 from anntzer/cleanup-generative-tests-again
Make @cleanup *really* support generative tests.
1 parent 0375ea4 commit 80be853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/testing/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def cleanup(style=None):
130130
# writing a decorator with optional arguments.
131131

132132
def make_cleanup(func):
133-
if inspect.isgenerator(func):
133+
if inspect.isgeneratorfunction(func):
134134
@functools.wraps(func)
135135
def wrapped_callable(*args, **kwargs):
136136
original_units_registry = matplotlib.units.registry.copy()

0 commit comments

Comments
 (0)