From a4c309e655d5904884e54cfdc07569839d2d1664 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 10 Mar 2017 16:11:54 -0500 Subject: [PATCH] TST: fail on missing baseline file --- lib/matplotlib/testing/decorators.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py index a026eb8c02ea..f2e9340034ee 100644 --- a/lib/matplotlib/testing/decorators.py +++ b/lib/matplotlib/testing/decorators.py @@ -281,12 +281,7 @@ def copy_baseline(self, baseline, extension): reason = ("Do not have baseline image {0} because this " "file does not exist: {1}".format(expected_fname, orig_expected_fname)) - if is_called_from_pytest(): - import pytest - pytest.xfail(reason) - else: - from ._nose import knownfail - knownfail(reason) + raise ImageComparisonFailure(reason) return expected_fname def compare(self, idx, baseline, extension):