Skip to content

COMPAT: Fix FutureWarning in tests with pyarrow 6.0.0 #44662

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

Merged
merged 1 commit into from
Nov 29, 2021
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
10 changes: 8 additions & 2 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from pandas.compat.pyarrow import (
pa_version_under2p0,
pa_version_under5p0,
pa_version_under6p0,
)
import pandas.util._test_decorators as td

Expand Down Expand Up @@ -902,10 +903,15 @@ def test_additional_extension_types(self, pa):
check_round_trip(df, pa)

def test_timestamp_nanoseconds(self, pa):
# with version 2.0, pyarrow defaults to writing the nanoseconds, so
# with version 2.6, pyarrow defaults to writing the nanoseconds, so
# this should work without error
# Note in previous pyarrows(<6.0.0), only the pseudo-version 2.0 was available
if not pa_version_under6p0:
ver = "2.6"
else:
ver = "2.0"
df = pd.DataFrame({"a": pd.date_range("2017-01-01", freq="1n", periods=10)})
check_round_trip(df, pa, write_kwargs={"version": "2.0"})
check_round_trip(df, pa, write_kwargs={"version": ver})

def test_timezone_aware_index(self, pa, timezone_aware_date_list):
if not pa_version_under2p0:
Expand Down