@@ -555,33 +555,33 @@ def test_deprecation(monkeypatch):
555555 monkeypatch .setitem (
556556 mpl ._deprecated_map , "patch.linewidth" ,
557557 ("0.0" , "axes.linewidth" , lambda old : 2 * old , lambda new : new / 2 ))
558- with pytest .warns (_api .MatplotlibDeprecationWarning ):
558+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
559559 assert mpl .rcParams ["patch.linewidth" ] \
560560 == mpl .rcParams ["axes.linewidth" ] / 2
561- with pytest .warns (_api .MatplotlibDeprecationWarning ):
561+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
562562 mpl .rcParams ["patch.linewidth" ] = 1
563563 assert mpl .rcParams ["axes.linewidth" ] == 2
564564
565565 monkeypatch .setitem (
566566 mpl ._deprecated_ignore_map , "patch.edgecolor" ,
567567 ("0.0" , "axes.edgecolor" ))
568- with pytest .warns (_api .MatplotlibDeprecationWarning ):
568+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
569569 assert mpl .rcParams ["patch.edgecolor" ] \
570570 == mpl .rcParams ["axes.edgecolor" ]
571- with pytest .warns (_api .MatplotlibDeprecationWarning ):
571+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
572572 mpl .rcParams ["patch.edgecolor" ] = "#abcd"
573573 assert mpl .rcParams ["axes.edgecolor" ] != "#abcd"
574574
575575 monkeypatch .setitem (
576576 mpl ._deprecated_ignore_map , "patch.force_edgecolor" ,
577577 ("0.0" , None ))
578- with pytest .warns (_api .MatplotlibDeprecationWarning ):
578+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
579579 assert mpl .rcParams ["patch.force_edgecolor" ] is None
580580
581581 monkeypatch .setitem (
582582 mpl ._deprecated_remain_as_none , "svg.hashsalt" ,
583583 ("0.0" ,))
584- with pytest .warns (_api .MatplotlibDeprecationWarning ):
584+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
585585 mpl .rcParams ["svg.hashsalt" ] = "foobar"
586586 assert mpl .rcParams ["svg.hashsalt" ] == "foobar" # Doesn't warn.
587587 mpl .rcParams ["svg.hashsalt" ] = None # Doesn't warn.
0 commit comments