Skip to content

Commit cbbeae1

Browse files
committed
Remove ignores and test warning
1 parent bd4f286 commit cbbeae1

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ Other Deprecations
416416
- Deprecated allowing non-keyword arguments in :meth:`Series.to_string` except ``buf``. (:issue:`57280`)
417417
- Deprecated behavior of :meth:`.DataFrameGroupBy.groups` and :meth:`.SeriesGroupBy.groups`, in a future version ``groups`` by one element list will return tuple instead of scalar. (:issue:`58858`)
418418
- Deprecated behavior of :meth:`Series.dt.to_pytimedelta`, in a future version this will return a :class:`Series` containing python ``datetime.timedelta`` objects instead of an ``ndarray`` of timedelta; this matches the behavior of other :meth:`Series.dt` properties. (:issue:`57463`)
419+
- Deprecated empty string in :class:`Timestamp` (:issue:`61149`)
419420
- Deprecated lowercase strings ``d``, ``b`` and ``c`` denoting frequencies in :class:`Day`, :class:`BusinessDay` and :class:`CustomBusinessDay` in favour of ``D``, ``B`` and ``C`` (:issue:`58998`)
420421
- Deprecated lowercase strings ``w``, ``w-mon``, ``w-tue``, etc. denoting frequencies in :class:`Week` in favour of ``W``, ``W-MON``, ``W-TUE``, etc. (:issue:`58998`)
421422
- Deprecated parameter ``method`` in :meth:`DataFrame.reindex_like` / :meth:`Series.reindex_like` (:issue:`58667`)

pandas/tests/indexing/test_loc.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,10 +2067,7 @@ 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(
2071-
"ignore:indexing past lexsort depth",
2072-
"ignore:Passing an empty string to Timestamp",
2073-
)
2070+
@pytest.mark.filterwarnings("ignore:indexing past lexsort depth")
20742071
def test_loc_setitem_with_expansion_nonunique_index(self, index):
20752072
# GH#40096
20762073
if not len(index):

pandas/tests/io/formats/test_to_csv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ 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:Passing an empty string to Timestamp")
301300
def test_to_csv_date_format_in_categorical(self):
302301
# GH#40754
303302
ser = pd.Series(pd.to_datetime(["2021-03-27", pd.NaT], format="%Y-%m-%d"))

pandas/tests/scalar/timestamp/test_constructors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ def test_constructor_float_not_round_with_YM_unit_raises(self):
6262
with pytest.raises(ValueError, match=msg):
6363
Timestamp(150.5, unit="M")
6464

65+
def test_constructor_with_empty_string(self):
66+
msg = "Passing an empty string to Timestamp"
67+
with tm.assert_produces_warning(DeprecationWarning, match=msg):
68+
Timestamp("")
69+
6570
@pytest.mark.parametrize(
6671
"value, check_kwargs",
6772
[

pandas/tests/test_multilevel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ 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:Passing an empty string to Timestamp")
299298
def test_multiindex_dt_with_nan(self):
300299
# GH#60388
301300
df = DataFrame(

0 commit comments

Comments
 (0)