Skip to content

Commit 996546f

Browse files
committed
wip
1 parent 3aa31dc commit 996546f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/tests/series/indexing/test_where.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ def test_where_unsafe():
7272
mask = s > 5
7373
expected = Series(list(range(6)) + values, dtype="float64")
7474

75-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
75+
with pytest.raises(TypeError, match="Invalid value"):
7676
s[mask] = values
77-
tm.assert_series_equal(s, expected)
77+
s = s.astype("float64")
78+
s[mask] = values
7879

7980
# see gh-3235
8081
s = Series(np.arange(10), dtype="int64")

pandas/tests/series/methods/test_convert_dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_convert_dtypes(
231231
copy = series.copy(deep=True)
232232

233233
if result.notna().sum() > 0 and result.dtype in ["interval[int64, right]"]:
234-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
234+
with pytest.raises(TypeError, match="Invalid value"):
235235
result[result.notna()] = np.nan
236236
else:
237237
result[result.notna()] = np.nan

0 commit comments

Comments
 (0)