Skip to content

Commit b527654

Browse files
committed
wip
1 parent 549b5bc commit b527654

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

pandas/tests/series/indexing/test_where.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,17 @@ def test_where_unsafe_float(float_numpy_dtype):
4242
@pytest.mark.parametrize(
4343
"dtype,expected_dtype",
4444
[
45-
(np.int8, np.float64),
46-
(np.int16, np.float64),
47-
(np.int32, np.float64),
48-
(np.int64, np.float64),
4945
(np.float32, np.float32),
5046
(np.float64, np.float64),
5147
],
5248
)
53-
def test_where_unsafe_upcast(dtype, expected_dtype):
49+
def test_where_upcast(dtype, expected_dtype):
5450
# see gh-9743
5551
s = Series(np.arange(10), dtype=dtype)
5652
values = [2.5, 3.5, 4.5, 5.5, 6.5]
5753
mask = s < 5
5854
expected = Series(values + list(range(5, 10)), dtype=expected_dtype)
59-
warn = (
60-
None
61-
if np.dtype(dtype).kind == np.dtype(expected_dtype).kind == "f"
62-
else FutureWarning
63-
)
64-
with tm.assert_produces_warning(warn, match="incompatible dtype"):
65-
s[mask] = values
55+
s[mask] = values
6656
tm.assert_series_equal(s, expected)
6757

6858

@@ -74,10 +64,6 @@ def test_where_unsafe():
7464
mask = s > 5
7565
expected = Series(list(range(6)) + values, dtype="float64")
7666

77-
with tm.assert_produces_warning(FutureWarning, match="incompatible dtype"):
78-
s[mask] = values
79-
tm.assert_series_equal(s, expected)
80-
8167
# see gh-3235
8268
s = Series(np.arange(10), dtype="int64")
8369
mask = s < 5

0 commit comments

Comments
 (0)