@@ -555,33 +555,33 @@ def test_deprecation(monkeypatch):
555
555
monkeypatch .setitem (
556
556
mpl ._deprecated_map , "patch.linewidth" ,
557
557
("0.0" , "axes.linewidth" , lambda old : 2 * old , lambda new : new / 2 ))
558
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
558
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
559
559
assert mpl .rcParams ["patch.linewidth" ] \
560
560
== mpl .rcParams ["axes.linewidth" ] / 2
561
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
561
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
562
562
mpl .rcParams ["patch.linewidth" ] = 1
563
563
assert mpl .rcParams ["axes.linewidth" ] == 2
564
564
565
565
monkeypatch .setitem (
566
566
mpl ._deprecated_ignore_map , "patch.edgecolor" ,
567
567
("0.0" , "axes.edgecolor" ))
568
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
568
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
569
569
assert mpl .rcParams ["patch.edgecolor" ] \
570
570
== mpl .rcParams ["axes.edgecolor" ]
571
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
571
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
572
572
mpl .rcParams ["patch.edgecolor" ] = "#abcd"
573
573
assert mpl .rcParams ["axes.edgecolor" ] != "#abcd"
574
574
575
575
monkeypatch .setitem (
576
576
mpl ._deprecated_ignore_map , "patch.force_edgecolor" ,
577
577
("0.0" , None ))
578
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
578
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
579
579
assert mpl .rcParams ["patch.force_edgecolor" ] is None
580
580
581
581
monkeypatch .setitem (
582
582
mpl ._deprecated_remain_as_none , "svg.hashsalt" ,
583
583
("0.0" ,))
584
- with pytest .warns (_api .MatplotlibDeprecationWarning ):
584
+ with pytest .warns (mpl .MatplotlibDeprecationWarning ):
585
585
mpl .rcParams ["svg.hashsalt" ] = "foobar"
586
586
assert mpl .rcParams ["svg.hashsalt" ] == "foobar" # Doesn't warn.
587
587
mpl .rcParams ["svg.hashsalt" ] = None # Doesn't warn.
0 commit comments