Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 11, 2024
1 parent 6ba1942 commit e0062fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions pandas/tests/dtypes/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ def test_update_dtype_errors(self, bad_dtype):
with pytest.raises(ValueError, match=msg):
dtype.update_dtype(bad_dtype)


@pytest.mark.parametrize(
"dtype", [CategoricalDtype, IntervalDtype, DatetimeTZDtype, PeriodDtype]
)
Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/extension/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
)

import pandas as pd
import pandas._testing as tm
from pandas import Series
import pandas._testing as tm
from pandas.api.extensions import no_default
from pandas.api.types import (
is_bool_dtype,
Expand Down Expand Up @@ -3514,11 +3514,11 @@ def test_map_numeric_na_action():
def test_pyarrow_timestamp_tz_preserved(tz):
s = Series(
pd.to_datetime(range(5), unit="h", utc=True).tz_convert(tz),
dtype=f"timestamp[ns, tz={tz}][pyarrow]"
dtype=f"timestamp[ns, tz={tz}][pyarrow]",
)

result = s.convert_dtypes(dtype_backend="pyarrow")
assert result.dtype == s.dtype, f"Expected {s.dtype}, got {result.dtype}"

assert str(result.iloc[0].tzinfo) == str(s.iloc[0].tzinfo)
tm.assert_series_equal(result, s)
tm.assert_series_equal(result, s)

0 comments on commit e0062fa

Please sign in to comment.