Skip to content

Commit

Permalink
Actually catch MatplotlibDeprecationWarning in cycles test
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen authored and QuLogic committed Oct 25, 2016
1 parent 0abb51f commit cd77e0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/matplotlib/tests/test_cycles.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import warnings

from matplotlib.testing.decorators import image_comparison, cleanup
from matplotlib.cbook import MatplotlibDeprecationWarning
import matplotlib.pyplot as plt
import numpy as np
from nose.tools import assert_raises
Expand Down Expand Up @@ -184,6 +185,7 @@ def test_cycle_reset():
fig, ax = plt.subplots()
# Need to double-check the old set/get_color_cycle(), too
with warnings.catch_warnings():
warnings.simplefilter("ignore", MatplotlibDeprecationWarning)
prop = next(ax._get_lines.prop_cycler)
ax.set_color_cycle(['c', 'm', 'y', 'k'])
assert prop != next(ax._get_lines.prop_cycler)
Expand Down

0 comments on commit cd77e0e

Please sign in to comment.