Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/testing/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import matplotlib
from matplotlib.compat import subprocess
from matplotlib.testing.noseclasses import ImageComparisonFailure
from matplotlib.testing.exceptions import ImageComparisonFailure
from matplotlib import _png
from matplotlib import _get_cachedir
from matplotlib import cbook
Expand Down
16 changes: 16 additions & 0 deletions lib/matplotlib/testing/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class KnownFailureTest(Exception):
"""
Raise this exception to mark a test as a known failing test.
"""


class KnownFailureDidNotFailTest(Exception):
"""
Raise this exception to mark a test should have failed but did not.
"""


class ImageComparisonFailure(AssertionError):
"""
Raise this exception to mark a test as a comparison between two images.
"""
15 changes: 4 additions & 11 deletions lib/matplotlib/testing/noseclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@

import os
from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
from matplotlib.testing.exceptions import (KnownFailureTest,
KnownFailureDidNotFailTest,
ImageComparisonFailure)

class KnownFailureTest(Exception):
'''Raise this exception to mark a test as a known failing test.'''
pass

class KnownFailureDidNotFailTest(Exception):
'''Raise this exception to mark a test should have failed but did not.'''
pass

class ImageComparisonFailure(AssertionError):
'''Raise this exception to mark a test as a comparison between two images.'''

class KnownFailure(ErrorClassPlugin):
'''Plugin that installs a KNOWNFAIL error class for the
Expand Down Expand Up @@ -46,7 +39,7 @@ def configure(self, options, conf):
if disable:
self.enabled = False

def addError( self, test, err, *zero_nine_capt_args ):
def addError(self, test, err, *zero_nine_capt_args):
# Fixme (Really weird): if I don't leave empty method here,
# nose gets confused and KnownFails become testing errors when
# using the MplNosePlugin and MplTestCase.
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/tests/test_coding_standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def test_pep8_conformance_installed_files():
'type1font.py',
'widgets.py',
'testing/decorators.py',
'testing/noseclasses.py',
'testing/jpl_units/Duration.py',
'testing/jpl_units/Epoch.py',
'testing/jpl_units/EpochConverter.py',
Expand Down