File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ def pytest_runtest_setup(self, item):
147
147
import matplotlib .pyplot as plt
148
148
from matplotlib .testing .compare import compare_images
149
149
from matplotlib .testing .decorators import ImageComparisonTest as MplImageComparisonTest
150
+ try :
151
+ from matplotlib .testing .decorators import remove_ticks_and_titles
152
+ except ImportError :
153
+ remove_ticks_and_titles = MplImageComparisonTest .remove_text
150
154
151
155
MPL_LT_15 = LooseVersion (matplotlib .__version__ ) < LooseVersion ('1.5' )
152
156
@@ -196,7 +200,7 @@ def item_function_wrapper(*args, **kwargs):
196
200
fig = original (* args , ** kwargs )
197
201
198
202
if remove_text :
199
- MplImageComparisonTest . remove_text (fig )
203
+ remove_ticks_and_titles (fig )
200
204
201
205
# Find test name to use as plot name
202
206
filename = compare .kwargs .get ('filename' , None )
You can’t perform that action at this time.
0 commit comments