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):
147147 import matplotlib .pyplot as plt
148148 from matplotlib .testing .compare import compare_images
149149 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
150154
151155 MPL_LT_15 = LooseVersion (matplotlib .__version__ ) < LooseVersion ('1.5' )
152156
@@ -196,7 +200,7 @@ def item_function_wrapper(*args, **kwargs):
196200 fig = original (* args , ** kwargs )
197201
198202 if remove_text :
199- MplImageComparisonTest . remove_text (fig )
203+ remove_ticks_and_titles (fig )
200204
201205 # Find test name to use as plot name
202206 filename = compare .kwargs .get ('filename' , None )
You can’t perform that action at this time.
0 commit comments