@@ -832,7 +832,7 @@ def test_datetime_invalid_scalar(self, value, format, infer):
832
832
833
833
msg = (
834
834
"is a bad directive in format|"
835
- "second must be in 0..59: 00:01:99 |"
835
+ "second must be in 0..59|"
836
836
"Given date string not likely a datetime"
837
837
)
838
838
with pytest .raises (ValueError , match = msg ):
@@ -886,7 +886,7 @@ def test_datetime_invalid_index(self, values, format, infer):
886
886
msg = (
887
887
"is a bad directive in format|"
888
888
"Given date string not likely a datetime|"
889
- "second must be in 0..59: 00:01:99 "
889
+ "second must be in 0..59"
890
890
)
891
891
with pytest .raises (ValueError , match = msg ):
892
892
pd .to_datetime (
@@ -1660,7 +1660,11 @@ def test_to_datetime_overflow(self):
1660
1660
# gh-17637
1661
1661
# we are overflowing Timedelta range here
1662
1662
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
+ )
1664
1668
with pytest .raises (OverflowError , match = msg ):
1665
1669
date_range (start = "1/1/1700" , freq = "B" , periods = 100000 )
1666
1670
0 commit comments