Skip to content

Commit 5e6e8f2

Browse files
committed
fix: compare tz timestamps as epoch micros (Windows lacks tz database)
1 parent 538394d commit 5e6e8f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/test_ggsql.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,10 @@ def test_timestamp_with_timezone(self, reader):
11381138
)
11391139
reader.register("t", pa.table({"ts": ts}))
11401140
result = reader.execute_sql("SELECT ts FROM t")
1141-
assert sorted(result.column("ts").to_pylist()) == sorted(ts.to_pylist())
1141+
# Compare as epoch microseconds: to_pylist() on tz-aware timestamps
1142+
# needs a tz database, which Windows lacks without the tzdata package
1143+
result_us = result.column("ts").cast(pa.int64()).to_pylist()
1144+
assert sorted(result_us) == sorted(ts.cast(pa.int64()).to_pylist())
11421145

11431146
def test_empty_result_set(self, reader):
11441147
"""A 0-row query result crosses the Rust->Python boundary cleanly."""

0 commit comments

Comments
 (0)