Skip to content

Commit 222313d

Browse files
committed
Move import of ImageComparisonTest to exception handler.
This will allow Matplotlib to deprecate and ultimately remove ImageComparisonTest (which is mostly pointless now, as a nose-runner that uses pytest markers...). Also allowed myself to add vim swap files to gitignore.
1 parent ec779cb commit 222313d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.*.swp
12
.tox
23
.cache
34
*.py[cod]

pytest_mpl/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ def pytest_runtest_setup(self, item):
177177
import matplotlib
178178
import matplotlib.pyplot as plt
179179
from matplotlib.testing.compare import compare_images
180-
from matplotlib.testing.decorators import ImageComparisonTest as MplImageComparisonTest
181180
try:
182181
from matplotlib.testing.decorators import remove_ticks_and_titles
183182
except ImportError:
183+
from matplotlib.testing.decorators import ImageComparisonTest as MplImageComparisonTest
184184
remove_ticks_and_titles = MplImageComparisonTest.remove_text
185185

186186
MPL_LT_15 = LooseVersion(matplotlib.__version__) < LooseVersion('1.5')

0 commit comments

Comments
 (0)