Skip to content

Commit 9241196

Browse files
author
nli307
committed
working on tests
1 parent 4b0a90c commit 9241196

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

pandas/tests/dtypes/cast/test_find_common_type.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,30 @@ def test_interval_dtype_with_categorical(dtype):
182182
["date32[pyarrow]", "null[pyarrow]"],
183183
"date32[day][pyarrow]",
184184
),
185+
(
186+
["date32[pyarrow]", "date32[pyarrow]"],
187+
"date32[day][pyarrow]",
188+
),
189+
(
190+
["date64[pyarrow]", "null[pyarrow]"],
191+
"date64[ms][pyarrow]", # timestamp[ms][pyarrow]
192+
),
193+
(
194+
["date64[pyarrow]", "date64[pyarrow]"],
195+
"date64[ms][pyarrow]",
196+
),
197+
(
198+
["date32[pyarrow]", "date64[pyarrow]"],
199+
"date64[ms][pyarrow]", # timestamp[ms][pyarrow]
200+
),
201+
(
202+
["date32[pyarrow]", "date64[pyarrow]", "datetime64[ms]"],
203+
"timestamp[ms][pyarrow]",
204+
),
185205
],
186206
)
187-
def test_pyarrow_dtypes(dtypes, expected):
188-
"""Test finding common types with pyarrow dtypes not in numpy."""
207+
def test_pyarrow_date_dtypes(dtypes, expected):
189208
source_dtypes = [pandas_dtype(dtype) for dtype in dtypes]
190209
result = find_common_type(source_dtypes)
210+
print(f'{source_dtypes}: {result}')
191211
assert result == pandas_dtype(expected)

0 commit comments

Comments
 (0)