8000 Updates for pytest and mpl2 · matplotlib/matplotlib@652cd7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 652cd7e

Browse files
fmaussionefiring
authored andcommitted
Updates for pytest and mpl2
1 parent 8cb7b45 commit 652cd7e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/matplotlib/colors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,6 @@ def __init__(self, boundaries, ncolors, clip=False, extend='neither'):
14391439
If the number of bins doesn't equal *ncolors*, the color is chosen
14401440
by linear interpolation of the bin number onto color numbers.
14411441
"""
1442-
14431442
if clip and extend != 'neither':
14441443
raise ValueError("'clip=True' is not compatible with 'extend'")
14451444
self.clip = clip
Loading

lib/matplotlib/tests/test_colors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from numpy.testing import assert_array_equal, assert_array_almost_equal
88

9-
from matplotlib import cyclert
9+
from matplotlib import cycler
1010
import matplotlib
1111
import matplotlib.colors as mcolors
1212
import matplotlib.cm as cm
@@ -297,8 +297,8 @@ def test_BoundaryNorm():
297297
np.testing.assert_array_equal(4, mynorm(12))
298298

299299
# Test raises
300-
assert_raises(ValueError, mcolors.BoundaryNorm, bounds, cmref.N,
301-
extend='both', clip=True)
300+
with pytest.raises(ValueError):
301+
mcolors.BoundaryNorm(bounds, cmref.N, extend='both', clip=True)
302302

303303
# Just min
304304
cmref = mcolors.ListedColormap(['blue', 'red'])

0 commit comments

Comments
 (0)
0