Skip to content

Commit f17f358

Browse files
BUG: Restructured test parameters pandas-dev#45319
1 parent 75e8fee commit f17f358

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

pandas/tests/tools/test_to_datetime.py

+8-13
Original file line numberDiff line numberDiff line change
@@ -2776,20 +2776,15 @@ def test_to_datetime_monotonic_increasing_index(cache):
27762776

27772777

27782778
@pytest.mark.parametrize(
2779-
"input",
2780-
[
2781-
Series(
2782-
[datetime.fromisoformat("1446-04-12 00:00:00+00:00")]
2783-
+ ([datetime.fromisoformat("1991-10-20 00:00:00+00:00")] * 40)
2784-
),
2785-
Series(
2786-
[datetime.fromisoformat("1446-04-12 00:00:00+00:00")]
2787-
+ ([datetime.fromisoformat("1991-10-20 00:00:00+00:00")] * 50)
2788-
),
2789-
],
2779+
"series_length",
2780+
range(40, start_caching_at + 5),
27902781
)
2791-
def test_to_datetime_cache_coerce_50_lines(input):
2782+
def test_to_datetime_cache_coerce_50_lines(series_length):
27922783
# GH#45319
2793-
result = to_datetime(input, errors="coerce", utc=True)
2784+
s = Series(
2785+
[datetime.fromisoformat("1446-04-12 00:00:00+00:00")]
2786+
+ ([datetime.fromisoformat("1991-10-20 00:00:00+00:00")] * series_length)
2787+
)
2788+
result = to_datetime(s, errors="coerce", utc=True)
27942789

27952790
assert result[0] is NaT

0 commit comments

Comments
 (0)