Skip to content

Commit

Permalink
MINOR: [Python] Avoid failing pyarrow compute test on leap day
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Feb 29, 2024
1 parent 909f6f9 commit 4fc84f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/pyarrow/tests/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down

0 comments on commit 4fc84f7

Please sign in to comment.