Skip to content

Commit 9c59258

Browse files
committed
Add timezone information to datetime objects in test_udaf_list_timestamp_return
1 parent 5271ba2 commit 9c59258

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/tests/test_udaf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from __future__ import annotations
1919

20-
from datetime import datetime
20+
from datetime import datetime, timezone
2121

2222
import pyarrow as pa
2323
import pyarrow.compute as pc
@@ -241,7 +241,10 @@ def test_register_udaf(ctx, df) -> None:
241241

242242

243243
def test_udaf_list_timestamp_return(ctx) -> None:
244-
timestamps = [datetime(2024, 1, 1), datetime(2024, 1, 2)]
244+
timestamps = [
245+
datetime(2024, 1, 1, tzinfo=timezone.utc),
246+
datetime(2024, 1, 2, tzinfo=timezone.utc),
247+
]
245248
batch = pa.RecordBatch.from_arrays(
246249
[pa.array(timestamps, type=pa.timestamp("ns"))],
247250
names=["ts"],

0 commit comments

Comments
 (0)