Skip to content

Commit 951ffb5

Browse files
committed
Added warning filters to relevant tests
1 parent 3639fd7 commit 951ffb5

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

pandas/tests/indexing/test_loc.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,12 @@ def test_loc_setitem_with_expansion_inf_upcast_empty(self):
20672067
expected = Index([0, 1, np.inf], dtype=np.float64)
20682068
tm.assert_index_equal(result, expected)
20692069

2070-
@pytest.mark.filterwarnings("ignore:indexing past lexsort depth")
2070+
@pytest.mark.filterwarnings(
2071+
[
2072+
"ignore:indexing past lexsort depth",
2073+
"ignore:empty string to Timestamp is deprecated",
2074+
]
2075+
)
20712076
def test_loc_setitem_with_expansion_nonunique_index(self, index):
20722077
# GH#40096
20732078
if not len(index):

pandas/tests/io/formats/test_to_csv.py

+1
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def test_to_csv_different_datetime_formats(self):
297297
expected = tm.convert_rows_list_to_csv_str(expected_rows)
298298
assert df.to_csv(index=False) == expected
299299

300+
@pytest.mark.filterwarnings("ignore:empty string to Timestamp is deprecated")
300301
def test_to_csv_date_format_in_categorical(self):
301302
# GH#40754
302303
ser = pd.Series(pd.to_datetime(["2021-03-27", pd.NaT], format="%Y-%m-%d"))

pandas/tests/scalar/timestamp/test_constructors.py

+1
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ def test_non_nano_value():
10781078
assert result == -52700112000
10791079

10801080

1081+
@pytest.mark.filterwarnings("ignore:empty string to Timestamp is deprecated")
10811082
@pytest.mark.parametrize("na_value", [None, np.nan, np.datetime64("NaT"), NaT, NA])
10821083
def test_timestamp_constructor_na_value(na_value):
10831084
# GH45481

pandas/tests/test_multilevel.py

+1
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ def test_multiindex_insert_level_with_na(self, na):
295295
df[na, "B"] = 1
296296
tm.assert_frame_equal(df[na], DataFrame([1], columns=["B"]))
297297

298+
@pytest.mark.filterwarnings("ignore:empty string to Timestamp is deprecated")
298299
def test_multiindex_dt_with_nan(self):
299300
# GH#60388
300301
df = DataFrame(

0 commit comments

Comments
 (0)