Skip to content

Commit

Permalink
removing test as ArrowDtype doe not have reset cache methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Koookadooo committed Dec 7, 2024
1 parent 46099a0 commit ff6e892
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions pandas/tests/dtypes/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,36 +1104,6 @@ def test_update_dtype_errors(self, bad_dtype):
with pytest.raises(ValueError, match=msg):
dtype.update_dtype(bad_dtype)

import pytest

class TestArrowDtype(Base):
@pytest.fixture
def dtype(self):
"""Fixture for ArrowDtype."""
pa = pytest.importorskip("pyarrow")
return ArrowDtype(pa.timestamp("ns", tz="UTC"))

def test_numpy_dtype_preserves_timezone(self, dtype):
pa = pytest.importorskip("pyarrow")
# Test timezone-aware timestamp
assert dtype.numpy_dtype == dtype.pyarrow_dtype.to_pandas_dtype()

def test_numpy_dtype_naive_timestamp(self):
pa = pytest.importorskip("pyarrow")
arrow_type = pa.timestamp("ns")
dtype = ArrowDtype(arrow_type)
assert dtype.numpy_dtype == pa.timestamp("ns").to_pandas_dtype()

@pytest.mark.parametrize("tz", ["UTC", "America/New_York", None])
def test_numpy_dtype_with_varied_timezones(self, tz):
pa = pytest.importorskip("pyarrow")
arrow_type = pa.timestamp("ns", tz=tz)
dtype = ArrowDtype(arrow_type)
if tz:
assert dtype.numpy_dtype == arrow_type.to_pandas_dtype()
else:
assert dtype.numpy_dtype == pa.timestamp("ns").to_pandas_dtype()

@pytest.mark.parametrize(
"dtype", [CategoricalDtype, IntervalDtype, DatetimeTZDtype, PeriodDtype]
)
Expand Down

0 comments on commit ff6e892

Please sign in to comment.