Skip to content

Commit 53cd943

Browse files
committed
Fix test failures
1 parent 52186cc commit 53cd943

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pandas/tests/frame/test_block_internals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def f(dtype):
251251
f("float64")
252252

253253
# 10822
254-
msg = "^Unknown datetime string format, unable to parse: aa, at position 0$"
254+
msg = "^Unknown datetime string format, unable to parse: aa$"
255255
with pytest.raises(ValueError, match=msg):
256256
f("M8[ns]")
257257

pandas/tests/io/parser/test_parse_dates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ def test_parse_multiple_delimited_dates_with_swap_warnings():
507507
with pytest.raises(
508508
ValueError,
509509
match=(
510-
r'^time data "31/05/2000" doesn\'t match format "%m/%d/%Y", '
511-
r"at position 1. You might want to try:"
510+
r'^time data "31/05/2000" doesn\'t match format "%m/%d/%Y". '
511+
r"You might want to try:"
512512
),
513513
):
514514
pd.to_datetime(["01/01/2000", "31/05/2000", "31/05/2001", "01/02/2000"])

pandas/tests/series/test_constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_infer_with_date_and_datetime(self):
8383
def test_unparsable_strings_with_dt64_dtype(self):
8484
# pre-2.0 these would be silently ignored and come back with object dtype
8585
vals = ["aa"]
86-
msg = "^Unknown datetime string format, unable to parse: aa, at position 0$"
86+
msg = "^Unknown datetime string format, unable to parse: aa$"
8787
with pytest.raises(ValueError, match=msg):
8888
Series(vals, dtype="datetime64[ns]")
8989

pandas/tests/tslibs/test_array_to_datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def test_to_datetime_barely_out_of_bounds():
260260
# Close enough to bounds that dropping nanos
261261
# would result in an in-bounds datetime.
262262
arr = np.array(["2262-04-11 23:47:16.854775808"], dtype=object)
263-
msg = "^Out of bounds nanosecond timestamp: 2262-04-11 23:47:16, at position 0$"
263+
msg = "^Out of bounds nanosecond timestamp: 2262-04-11 23:47:16$"
264264

265265
with pytest.raises(tslib.OutOfBoundsDatetime, match=msg):
266266
tslib.array_to_datetime(arr)

0 commit comments

Comments
 (0)