forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,6 @@ Other API changes | |
Deprecations | ||
~~~~~~~~~~~~ | ||
|
||
|
||
Copy keyword | ||
^^^^^^^^^^^^ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import warnings | ||
|
||
from pandas.util._decorators import deprecate_kwarg | ||
from pandas.util._exceptions import Pandas40DeprecationWarning | ||
|
||
import pandas._testing as tm | ||
|
||
|
||
def f1(): | ||
warnings.warn("f1", Pandas40DeprecationWarning) | ||
|
||
|
||
def test_function_warns_pandas_deprecation_warning(): | ||
with tm.assert_produces_warning(DeprecationWarning): | ||
f1() | ||
|
||
|
||
@deprecate_kwarg("old", "new") | ||
def f2(new=0): | ||
return new | ||
|
||
|
||
def test_decorator_warns_pandas_deprecation_warning(): | ||
with tm.assert_produces_warning(DeprecationWarning): | ||
f2(old=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters