We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff88b30 commit 3c3bafaCopy full SHA for 3c3bafa
pandas/tests/tools/test_to_timedelta.py
@@ -121,6 +121,23 @@ def test_to_timedelta_invalid(self):
121
invalid_data, to_timedelta(invalid_data, errors="ignore")
122
)
123
124
+ @pytest.mark.parametrize(
125
+ "val",
126
+ [
127
+ "1M",
128
+ "1 M",
129
+ "1Y",
130
+ "1 Y",
131
+ "1m",
132
+ "1 m",
133
+ "1y",
134
+ "1 y",
135
+ ],
136
+ )
137
+ def test_unambiguous_timedelta_values(self, val):
138
+ with tm.assert_produces_warning(FutureWarning):
139
+ to_timedelta(val)
140
+
141
def test_to_timedelta_via_apply(self):
142
# GH 5458
143
expected = Series([np.timedelta64(1, "s")])
0 commit comments