@@ -50,38 +50,44 @@ def test_get_param(self):
5050 assert ct .config ._get_param ('config' , 'test4' , {'test4' : 1 }, None ) == 1
5151
5252 def test_default_deprecation (self ):
53- ct .config .defaults ['config.newkey' ] = 1
5453 ct .config .defaults ['deprecated.config.oldkey' ] = 'config.newkey'
5554 ct .config .defaults ['deprecated.config.oldmiss' ] = 'config.newmiss'
5655
5756 msgpattern = r'config\.oldkey.* has been renamed to .*config\.newkey'
5857
59- with pytest .warns (DeprecationWarning , match = msgpattern ):
58+ ct .config .defaults ['config.newkey' ] = 1
59+ with pytest .warns (FutureWarning , match = msgpattern ):
6060 assert ct .config .defaults ['config.oldkey' ] == 1
61- with pytest .warns (DeprecationWarning , match = msgpattern ):
61+ with pytest .warns (FutureWarning , match = msgpattern ):
6262 ct .config .defaults ['config.oldkey' ] = 2
63- with pytest .warns (DeprecationWarning , match = msgpattern ):
63+ with pytest .warns (FutureWarning , match = msgpattern ):
6464 assert ct .config .defaults ['config.oldkey' ] == 2
6565 assert ct .config .defaults ['config.newkey' ] == 2
6666
6767 ct .config .set_defaults ('config' , newkey = 3 )
68- with pytest .warns (DeprecationWarning , match = msgpattern ):
68+ with pytest .warns (FutureWarning , match = msgpattern ):
6969 assert ct .config ._get_param ('config' , 'oldkey' ) == 3
70- with pytest .warns (DeprecationWarning , match = msgpattern ):
70+ with pytest .warns (FutureWarning , match = msgpattern ):
7171 ct .config .set_defaults ('config' , oldkey = 4 )
72- with pytest .warns (DeprecationWarning , match = msgpattern ):
72+ with pytest .warns (FutureWarning , match = msgpattern ):
7373 assert ct .config .defaults ['config.oldkey' ] == 4
7474 assert ct .config .defaults ['config.newkey' ] == 4
7575
76+ ct .config .defaults .update ({'config.newkey' : 5 })
77+ with pytest .warns (FutureWarning , match = msgpattern ):
78+ ct .config .defaults .update ({'config.oldkey' : 6 })
79+ with pytest .warns (FutureWarning , match = msgpattern ):
80+ assert ct .config .defaults .get ('config.oldkey' ) == 6
81+
7682 with pytest .raises (KeyError ):
77- with pytest .warns (DeprecationWarning , match = msgpattern ):
83+ with pytest .warns (FutureWarning , match = msgpattern ):
7884 ct .config .defaults ['config.oldmiss' ]
7985 with pytest .raises (KeyError ):
8086 ct .config .defaults ['config.neverdefined' ]
8187
8288 # assert that reset defaults keeps the custom type
8389 ct .config .reset_defaults ()
84- with pytest .warns (DeprecationWarning ,
90+ with pytest .warns (FutureWarning ,
8591 match = 'bode.* has been renamed to.*freqplot' ):
8692 assert ct .config .defaults ['bode.Hz' ] \
8793 == ct .config .defaults ['freqplot.Hz' ]
0 commit comments