Skip to content

TST: Fix failing test from #37027 #37048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pandas/tests/tools/test_to_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ def test_datetime_invalid_scalar(self, value, format, infer):

msg = (
"is a bad directive in format|"
"second must be in 0..59: 00:01:99|"
"second must be in 0..59|"
"Given date string not likely a datetime"
)
with pytest.raises(ValueError, match=msg):
Expand Down Expand Up @@ -886,7 +886,7 @@ def test_datetime_invalid_index(self, values, format, infer):
msg = (
"is a bad directive in format|"
"Given date string not likely a datetime|"
"second must be in 0..59: 00:01:99"
"second must be in 0..59"
)
with pytest.raises(ValueError, match=msg):
pd.to_datetime(
Expand Down Expand Up @@ -1660,7 +1660,11 @@ def test_to_datetime_overflow(self):
# gh-17637
# we are overflowing Timedelta range here

msg = "Python int too large to convert to C long"
msg = (
"(Python int too large to convert to C long)|"
"(long too big to convert)|"
"(int too big to convert)"
)
with pytest.raises(OverflowError, match=msg):
date_range(start="1/1/1700", freq="B", periods=100000)

Expand Down