File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,10 @@ def test_where_unsafe():
72
72
mask = s > 5
73
73
expected = Series (list (range (6 )) + values , dtype = "float64" )
74
74
75
- with tm . assert_produces_warning ( FutureWarning , match = "incompatible dtype " ):
75
+ with pytest . raises ( TypeError , match = "Invalid value " ):
76
76
s [mask ] = values
77
- tm .assert_series_equal (s , expected )
77
+ s = s .astype ("float64" )
78
+ s [mask ] = values
78
79
79
80
# see gh-3235
80
81
s = Series (np .arange (10 ), dtype = "int64" )
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ def test_convert_dtypes(
231
231
copy = series .copy (deep = True )
232
232
233
233
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 " ):
235
235
result [result .notna ()] = np .nan
236
236
else :
237
237
result [result .notna ()] = np .nan
You can’t perform that action at this time.
0 commit comments