From 4fc84f7e4f7ec183d5d1723a34e3855cc915f662 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 29 Feb 2024 09:35:15 +0100 Subject: [PATCH] MINOR: [Python] Avoid failing pyarrow compute test on leap day --- python/pyarrow/tests/test_compute.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/pyarrow/tests/test_compute.py b/python/pyarrow/tests/test_compute.py index 4b58dc65bae9b..98cbd920b509b 100644 --- a/python/pyarrow/tests/test_compute.py +++ b/python/pyarrow/tests/test_compute.py @@ -3214,8 +3214,7 @@ def test_list_element(): def test_count_distinct(): - seed = datetime.datetime.now() - samples = [seed.replace(year=y) for y in range(1992, 2092)] + samples = [datetime.datetime(year=y, month=1, day=1) for y in range(1992, 2092)] arr = pa.array(samples, pa.timestamp("ns")) assert pc.count_distinct(arr) == pa.scalar(len(samples), type=pa.int64())