Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Aug 23, 2023
1 parent f4f23f7 commit fc9531e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file added example
Binary file not shown.
11 changes: 10 additions & 1 deletion pandas/tests/extension/test_masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
be added to the array-specific tests in `pandas/tests/arrays/`.
"""
import warnings

import numpy as np
import pytest

Expand Down Expand Up @@ -186,7 +188,14 @@ def _cast_pointwise_result(self, op_name: str, obj, other, pointwise_result):

if sdtype.kind in "iu":
if op_name in ("__rtruediv__", "__truediv__", "__div__"):
expected = expected.fillna(np.nan).astype("Float64")
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
"Downcasting object dtype arrays",
category=FutureWarning,
)
filled = expected.fillna(np.nan)
expected = filled.astype("Float64")
else:
# combine method result in 'biggest' (int64) dtype
expected = expected.astype(sdtype)
Expand Down

0 comments on commit fc9531e

Please sign in to comment.