Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a4c309e

Browse files
committed
TST: fail on missing baseline file
1 parent a34c859 commit a4c309e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,7 @@ def copy_baseline(self, baseline, extension):
281281
reason = ("Do not have baseline image {0} because this "
282282
"file does not exist: {1}".format(expected_fname,
283283
orig_expected_fname))
284-
if is_called_from_pytest():
285-
import pytest
286-
pytest.xfail(reason)
287-
else:
288-
from ._nose import knownfail
289-
knownfail(reason)
284+
raise ImageComparisonFailure(reason)
290285
return expected_fname
291286

292287
def compare(self, idx, baseline, extension):

0 commit comments

Comments
 (0)