Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9ff8871

Browse files
committedMar 20, 2025·
Corrected message matching in filterwarnings
1 parent 951ffb5 commit 9ff8871

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
 

‎pandas/tests/indexing/test_loc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@ def test_loc_setitem_with_expansion_inf_upcast_empty(self):
20702070
@pytest.mark.filterwarnings(
20712071
[
20722072
"ignore:indexing past lexsort depth",
2073-
"ignore:empty string to Timestamp is deprecated",
2073+
"ignore:Passing an empty string to Timestamp",
20742074
]
20752075
)
20762076
def test_loc_setitem_with_expansion_nonunique_index(self, index):

‎pandas/tests/io/formats/test_to_csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +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")
300+
@pytest.mark.filterwarnings("ignore:Passing an empty string to Timestamp")
301301
def test_to_csv_date_format_in_categorical(self):
302302
# GH#40754
303303
ser = pd.Series(pd.to_datetime(["2021-03-27", pd.NaT], format="%Y-%m-%d"))

‎pandas/tests/scalar/timestamp/test_constructors.py

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

10801080

1081-
@pytest.mark.filterwarnings("ignore:empty string to Timestamp is deprecated")
1081+
@pytest.mark.filterwarnings("ignore:Passing an empty string to Timestamp")
10821082
@pytest.mark.parametrize("na_value", [None, np.nan, np.datetime64("NaT"), NaT, NA])
10831083
def test_timestamp_constructor_na_value(na_value):
10841084
# GH45481

‎pandas/tests/test_multilevel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +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")
298+
@pytest.mark.filterwarnings("ignore:Passing an empty string to Timestamp")
299299
def test_multiindex_dt_with_nan(self):
300300
# GH#60388
301301
df = DataFrame(

0 commit comments

Comments
 (0)
Please sign in to comment.