Skip to content

Commit f3545bf

Browse files
committed
updated test logic
1 parent b918323 commit f3545bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/tests/extension/test_arrow.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,14 @@ def test_compare_scalar(self, data, comparison_op):
281281
@pytest.mark.parametrize("na_action", [None, "ignore"])
282282
def test_map(self, data_missing, na_action):
283283
if data_missing.dtype.kind in "mM":
284-
result = pd.Series(data_missing.map(lambda x: x, na_action=na_action))
285-
expected = pd.Series(data_missing.to_numpy()).astype(result.dtype)
284+
result = pd.Series(
285+
np.asarray(
286+
data_missing.map(lambda x: x, na_action=na_action), dtype="int64"
287+
)
288+
)
289+
expected = pd.Series(
290+
data_missing.to_numpy().astype(result.dtype).view("int64")
291+
)
286292
tm.assert_series_equal(result, expected, check_dtype=False)
287293
else:
288294
result = data_missing.map(lambda x: x, na_action=na_action)

0 commit comments

Comments
 (0)