File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,28 @@ def test_safe_first_element_pandas_series(pd):
574
574
assert actual == 0
575
575
576
576
577
+ def test_delete_parameter ():
578
+ @cbook ._delete_parameter ("3.0" , "foo" )
579
+ def func1 (foo = None ):
580
+ pass
581
+
582
+ @cbook ._delete_parameter ("3.0" , "foo" )
583
+ def func2 (** kwargs ):
584
+ pass
585
+
586
+ for func in [func1 , func2 ]:
587
+ func () # No warning.
588
+ with pytest .warns (MatplotlibDeprecationWarning ):
589
+ func (foo = "bar" )
590
+
591
+ def pyplot_wrapper (foo = cbook .deprecation ._deprecated_parameter ):
592
+ func1 (foo )
593
+
594
+ pyplot_wrapper () # No warning.
595
+ with pytest .warns (MatplotlibDeprecationWarning ):
596
+ func (foo = "bar" )
<
4F8F
code>597 +
598
+
577
599
def test_make_keyword_only ():
578
600
@cbook ._make_keyword_only ("3.0" , "arg" )
579
601
def func (pre , arg , post = None ):
You can’t perform that action at this time.
0 commit comments