Skip to content

Commit

Permalink
tests: fix pandas warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 5, 2024
1 parent a95cd88 commit a4d15c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- matplotlib # gui
- numpy # pandas, keras, contrib.tenumerate
- pandas
- pyarrow # pandas
- tensorflow # keras
- slack-sdk # contrib.slack
- requests # contrib.telegram
Expand Down
6 changes: 6 additions & 0 deletions tests/tests_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ def task_func(x):
f"\nExpected:\n{exres} at least once.\nIn:\n{our_file.read()}\n")


@mark.filterwarnings(
"ignore:DataFrameGroupBy.apply operated on the grouping columns:DeprecationWarning")
def test_pandas_groupby_apply():
"""Test pandas.DataFrame.groupby(...).progress_apply"""
with closing(StringIO()) as our_file:
Expand Down Expand Up @@ -167,6 +169,8 @@ def test_pandas_groupby_apply():
f"\nExpected:\n{exres} at least once.\nIn:\n{our_file.read()}\n")


@mark.filterwarnings(
"ignore:DataFrameGroupBy.apply operated on the grouping columns:DeprecationWarning")
def test_pandas_leave():
"""Test pandas with `leave=True`"""
with closing(StringIO()) as our_file:
Expand Down Expand Up @@ -201,6 +205,8 @@ def test_pandas_apply_args_deprecation():
"keyword arguments instead"))


@mark.filterwarnings(
"ignore:DataFrameGroupBy.apply operated on the grouping columns:DeprecationWarning")
def test_pandas_deprecation():
"""Test bar object instance as argument deprecation"""
try:
Expand Down

0 comments on commit a4d15c8

Please sign in to comment.