Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd77e0e

Browse files
jenshnielsenQuLogic
authored andcommitted
Actually catch MatplotlibDeprecationWarning in cycles test
1 parent 0abb51f commit cd77e0e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/matplotlib/tests/test_cycles.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import warnings
22

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

0 commit comments

Comments
 (0)