Skip to content

Commit a9c9386

Browse files
committed
(fix): allow more data types through
1 parent 59b03f2 commit a9c9386

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

xarray/tests/test_variable.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,7 @@ def test_pandas_datetime64_with_tz(self):
673673
)
674674
v = self.cls("x", data)
675675
print(v) # should not error
676-
if "America/New_York" in str(data.dtype):
677-
# pandas is new enough that it has datetime64 with timezone dtype
678-
assert v.dtype == "object"
676+
assert v.dtype == data.dtype
679677

680678
def test_multiindex(self):
681679
idx = pd.MultiIndex.from_product([list("abc"), [0, 1]])
@@ -3027,7 +3025,7 @@ def test_pandas_two_only_datetime_conversion_warnings(
30273025
var = Variable(["time"], data.astype(dtype)) # type: ignore[arg-type]
30283026

30293027
if var.dtype.kind == "M":
3030-
assert var.dtype == np.dtype("datetime64[s]")
3028+
assert var.dtype == dtype
30313029
else:
30323030
# The only case where a non-datetime64 dtype can occur currently is in
30333031
# the case that the variable is backed by a timezone-aware

0 commit comments

Comments
 (0)