From a4d15c8e2f6c7322c1a1cd1d845927f037281da1 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 5 Feb 2024 22:52:27 +0000 Subject: [PATCH] tests: fix pandas warnings --- environment.yml | 1 + tests/tests_pandas.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/environment.yml b/environment.yml index af281768..e2e6b95c 100644 --- a/environment.yml +++ b/environment.yml @@ -28,6 +28,7 @@ dependencies: - matplotlib # gui - numpy # pandas, keras, contrib.tenumerate - pandas +- pyarrow # pandas - tensorflow # keras - slack-sdk # contrib.slack - requests # contrib.telegram diff --git a/tests/tests_pandas.py b/tests/tests_pandas.py index 9692feef..09dff1ea 100644 --- a/tests/tests_pandas.py +++ b/tests/tests_pandas.py @@ -115,6 +115,8 @@ def test_pandas_data_frame(): 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: @@ -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: @@ -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: