Skip to content

Commit 42c889a

Browse files
Fix: Add additional filter warnings to the failing tests
1 parent 3421823 commit 42c889a

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

pandas/tests/groupby/test_groupby.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,6 +2851,9 @@ def test_groupby_with_Time_Grouper(unit):
28512851
tm.assert_frame_equal(result, expected_output)
28522852

28532853

2854+
@pytest.mark.filterwarnings(
2855+
"ignore:Parsing non-ISO datetime strings:pandas.errors.Pandas4Warning"
2856+
)
28542857
def test_groupby_series_with_datetimeindex_month_name():
28552858
# GH 48509
28562859
s = Series([0, 1, 0], index=date_range("2022-01-01", periods=3), name="jan")

pandas/tests/indexing/multiindex/test_slice.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ def test_multiindex_slicers_datetimelike(self):
308308
]
309309
tm.assert_frame_equal(result, expected)
310310

311+
@pytest.mark.filterwarnings(
312+
"ignore:Parsing non-ISO datetime strings:pandas.errors.Pandas4Warning"
313+
)
311314
def test_multiindex_slicers_edges(self):
312315
# GH 8132
313316
# various edge cases

pandas/tests/indexing/test_loc.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ def test_loc_getitem_single_boolean_arg(self, obj, key, exp):
261261

262262
class TestLocBaseIndependent:
263263
# Tests for loc that do not depend on subclassing Base
264+
@pytest.mark.filterwarnings(
265+
"ignore:Parsing non-ISO datetime strings:pandas.errors.Pandas4Warning"
266+
)
264267
def test_loc_npstr(self):
265268
# GH#45580
266269
df = DataFrame(index=date_range("2021", "2022"))
@@ -1262,6 +1265,9 @@ def test_loc_setitem_str_to_small_float_conversion_type(self, using_infer_string
12621265
expected = DataFrame(col_data, columns=["A"], dtype=float)
12631266
tm.assert_frame_equal(result, expected)
12641267

1268+
@pytest.mark.filterwarnings(
1269+
"ignore:Parsing non-ISO datetime strings:pandas.errors.Pandas4Warning"
1270+
)
12651271
def test_loc_getitem_time_object(self, frame_or_series):
12661272
rng = date_range("1/1/2000", "1/5/2000", freq="5min")
12671273
mask = (rng.hour == 9) & (rng.minute == 30)
@@ -2415,6 +2421,9 @@ def test_loc_getitem_partial_slice_non_monotonicity(
24152421

24162422

24172423
class TestLabelSlicing:
2424+
@pytest.mark.filterwarnings(
2425+
"ignore:Parsing non-ISO datetime strings:pandas.errors.Pandas4Warning"
2426+
)
24182427
def test_loc_getitem_slicing_datetimes_frame(self):
24192428
# GH#7523
24202429

0 commit comments

Comments
 (0)