Skip to content

Commit e27dc9a

Browse files
committed
improving OutOfBoundsDatetime exception messages
1 parent 26f7d1f commit e27dc9a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/tests/base/test_constructors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def test_constructor_datetime_outofbound(self, a, klass):
157157

158158
# Explicit dtype specified
159159
# Forced conversion fails for all -> all cases raise error
160-
msg = "Out of bounds|" \
161-
f"Cannot convert \"{a[0]}\" at position 0 to datetime"
160+
msg = f'Out of bounds|Cannot convert "{a[0]}" at position 0 to datetime'
162161
with pytest.raises(pd.errors.OutOfBoundsDatetime, match=msg):
163162
klass(a, dtype="datetime64[ns]")
164163

0 commit comments

Comments
 (0)