Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(python): fix 'tz_aware.parquet' location in test (don't rely on implicit working directory) #11111

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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