Skip to content

Commit f083cbd

Browse files
author
MarcoGorelli
committed
fixup
1 parent 43562f6 commit f083cbd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/tests/tslibs/test_parsing.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
from datetime import datetime
55
import re
66

7-
from dateutil.parser import (
8-
parse,
9-
parse as du_parse,
10-
)
7+
from dateutil.parser import parse as du_parse
118
import numpy as np
129
import pytest
1310

@@ -271,9 +268,11 @@ def test_guess_datetime_format_no_padding(string, fmt, dayfirst, warning):
271268

272269
def test_try_parse_dates():
273270
arr = np.array(["5/1/2000", "6/1/2000", "7/1/2000"], dtype=object)
274-
result = parsing.try_parse_dates(arr, dayfirst=True, parser=du_parse)
271+
result = parsing.try_parse_dates(
272+
arr, dayfirst=True, parser=lambda x: du_parse(x, dayfirst=True)
273+
)
275274

276-
expected = np.array([parse(d, dayfirst=True) for d in arr])
275+
expected = np.array([du_parse(d, dayfirst=True) for d in arr])
277276
tm.assert_numpy_array_equal(result, expected)
278277

279278

0 commit comments

Comments
 (0)