Skip to content

Commit

Permalink
test(python): fix 'tz_aware.parquet' location in test (don't rely on …
Browse files Browse the repository at this point in the history
…implicit working directory) (#11111)
  • Loading branch information
alexander-beedie authored Sep 14, 2023
1 parent cc0e8e6 commit 4bd518f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions py-polars/tests/unit/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io
from datetime import datetime, timezone
from pathlib import Path
from typing import TYPE_CHECKING

import numpy as np
Expand All @@ -15,6 +14,8 @@
from polars.testing import assert_frame_equal, assert_series_equal

if TYPE_CHECKING:
from pathlib import Path

from polars.type_aliases import ParquetCompression


Expand Down Expand Up @@ -486,10 +487,8 @@ def test_parquet_string_cache() -> None:
assert_series_equal(pl.read_parquet(f)["a"].cast(str), df["a"].cast(str))


def test_tz_aware_parquet_9586() -> None:
result = pl.read_parquet(
Path("tests") / "unit" / "io" / "files" / "tz_aware.parquet"
)
def test_tz_aware_parquet_9586(io_files_path: Path) -> None:
result = pl.read_parquet(io_files_path / "tz_aware.parquet")
expected = pl.DataFrame(
{"UTC_DATETIME_ID": [datetime(2023, 6, 26, 14, 15, 0, tzinfo=timezone.utc)]}
).select(pl.col("*").cast(pl.Datetime("ns", "UTC")))
Expand Down

0 comments on commit 4bd518f

Please sign in to comment.