Skip to content

Commit 27264cc

Browse files
author
MarcoGorelli
committed
fixup
1 parent 81da13f commit 27264cc

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

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

275272
def test_try_parse_dates():
276273
arr = np.array(["5/1/2000", "6/1/2000", "7/1/2000"], dtype=object)
277-
result = parsing.try_parse_dates(arr, dayfirst=True, parser=du_parse)
274+
result = parsing.try_parse_dates(
275+
arr, dayfirst=True, parser=lambda x: du_parse(x, dayfirst=True)
276+
)
278277

279-
expected = np.array([parse(d, dayfirst=True) for d in arr])
278+
expected = np.array([du_parse(d, dayfirst=True) for d in arr])
280279
tm.assert_numpy_array_equal(result, expected)
281280

282281

0 commit comments

Comments
 (0)