Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f505cd0

Browse filesBrowse files
committed
Merge pull request #4555 from astrofrog/compare-nose-dep
ENH: No nose dependancy for matplotlib.testing.compare
2 parents 44ee7f9 + 2371d19 commit f505cd0
Copy full SHA for f505cd0

File tree

Expand file treeCollapse file tree

4 files changed

+21
-13
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+21
-13
lines changed

‎lib/matplotlib/testing/compare.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/compare.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import matplotlib
1717
from matplotlib.compat import subprocess
18-
from matplotlib.testing.noseclasses import ImageComparisonFailure
18+
from matplotlib.testing.exceptions import ImageComparisonFailure
1919
from matplotlib import _png
2020
from matplotlib import _get_cachedir
2121
from matplotlib import cbook

‎lib/matplotlib/testing/exceptions.py

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class KnownFailureTest(Exception):
2+
"""
3+
Raise this exception to mark a test as a known failing test.
4+
"""
5+
6+
7+
class KnownFailureDidNotFailTest(Exception):
8+
"""
9+
Raise this exception to mark a test should have failed but did not.
10+
"""
11+
12+
13+
class ImageComparisonFailure(AssertionError):
14+
"""
15+
Raise this exception to mark a test as a comparison between two images.
16+
"""

‎lib/matplotlib/testing/noseclasses.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/noseclasses.py
+4-11Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,10 @@
55

66
import os
77
from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
8+
from matplotlib.testing.exceptions import (KnownFailureTest,
9+
KnownFailureDidNotFailTest,
10+
ImageComparisonFailure)
811

9-
class KnownFailureTest(Exception):
10-
'''Raise this exception to mark a test as a known failing test.'''
11-
pass
12-
13-
class KnownFailureDidNotFailTest(Exception):
14-
'''Raise this exception to mark a test should have failed but did not.'''
15-
pass
16-
17-
class ImageComparisonFailure(AssertionError):
18-
'''Raise this exception to mark a test as a comparison between two images.'''
1912

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

49-
def addError( self, test, err, *zero_nine_capt_args ):
42+
def addError(self, test, err, *zero_nine_capt_args):
5043
# Fixme (Really weird): if I don't leave empty method here,
5144
# nose gets confused and KnownFails become testing errors when
5245
# using the MplNosePlugin and MplTestCase.

‎lib/matplotlib/tests/test_coding_standards.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_coding_standards.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def test_pep8_conformance_installed_files():
194194
'type1font.py',
195195
'widgets.py',
196196
'testing/decorators.py',
197-
'testing/noseclasses.py',
198197
'testing/jpl_units/Duration.py',
199198
'testing/jpl_units/Epoch.py',
200199
'testing/jpl_units/EpochConverter.py',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.