Skip to content

Commit 7885fd3

Browse files
committed
TST: Fix failing test from #37027
1 parent 601eff1 commit 7885fd3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/tools/test_to_datetime.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ def test_datetime_invalid_scalar(self, value, format, infer):
832832

833833
msg = (
834834
"is a bad directive in format|"
835-
"second must be in 0..59: 00:01:99|"
835+
"second must be in 0..59|"
836836
"Given date string not likely a datetime"
837837
)
838838
with pytest.raises(ValueError, match=msg):
@@ -886,7 +886,7 @@ def test_datetime_invalid_index(self, values, format, infer):
886886
msg = (
887887
"is a bad directive in format|"
888888
"Given date string not likely a datetime|"
889-
"second must be in 0..59: 00:01:99"
889+
"second must be in 0..59"
890890
)
891891
with pytest.raises(ValueError, match=msg):
892892
pd.to_datetime(
@@ -1660,7 +1660,11 @@ def test_to_datetime_overflow(self):
16601660
# gh-17637
16611661
# we are overflowing Timedelta range here
16621662

1663-
msg = "Python int too large to convert to C long"
1663+
msg = (
1664+
"(Python int too large to convert to C long)|"
1665+
"(long too big to convert)|"
1666+
"(int too big to convert)"
1667+
)
16641668
with pytest.raises(OverflowError, match=msg):
16651669
date_range(start="1/1/1700", freq="B", periods=100000)
16661670

0 commit comments

Comments
 (0)