Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ImageComparisonTest.setup_class
1 parent b65be40 commit bda6e6aCopy full SHA for bda6e6a
1 file changed
lib/matplotlib/testing/decorators.py
@@ -180,17 +180,14 @@ class ImageComparisonTest(CleanupTest):
180
@classmethod
181
def setup_class(cls):
182
CleanupTest.setup_class()
183
- cls._initial_settings = mpl.rcParams.copy()
184
try:
185
matplotlib.style.use(cls._style)
+ matplotlib.testing.set_font_settings_for_testing()
186
+ cls._func()
187
except:
188
# Restore original settings before raising errors during the update.
- mpl.rcParams.clear()
189
- mpl.rcParams.update(cls._initial_settings)
+ CleanupTest.teardown_class()
190
raise
191
- cls.original_settings = cls._initial_settings
192
- matplotlib.testing.set_font_settings_for_testing()
193
- cls._func()
194
195
196
def teardown_class(cls):
0 commit comments