Skip to content

Commit bb597c3

Browse files
committed
wip
1 parent 338ae86 commit bb597c3

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

pandas/tests/frame/indexing/test_where.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -513,26 +513,15 @@ def test_where_axis_with_upcast(self):
513513
tm.assert_frame_equal(result, expected)
514514

515515
result = df.copy()
516-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
517-
return_value = result.where(mask, ser, axis="index", inplace=True)
518-
assert return_value is None
519-
tm.assert_frame_equal(result, expected)
516+
with pytest.raises(TypeError, match="Invalid value"):
517+
result.where(mask, ser, axis="index", inplace=True)
520518

521519
expected = DataFrame([[0, np.nan], [0, np.nan]])
522520
result = df.where(mask, ser, axis="columns")
523521
tm.assert_frame_equal(result, expected)
524522

525-
expected = DataFrame(
526-
{
527-
0: np.array([0, 0], dtype="int64"),
528-
1: np.array([np.nan, np.nan], dtype="float64"),
529-
}
530-
)
531-
result = df.copy()
532-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
533-
return_value = result.where(mask, ser, axis="columns", inplace=True)
534-
assert return_value is None
535-
tm.assert_frame_equal(result, expected)
523+
with pytest.raises(TypeError, match="Invalid value"):
524+
result.where(mask, ser, axis="columns", inplace=True)
536525

537526
def test_where_axis_multiple_dtypes(self):
538527
# Multiple dtypes (=> multiple Blocks)

0 commit comments

Comments
 (0)