@@ -626,12 +626,6 @@ def test_arith_flex_frame_corner(self, float_frame):
626626 expected = float_frame .sort_index () * np .nan
627627 tm .assert_frame_equal (result , expected )
628628
629- with pytest .raises (NotImplementedError , match = "fill_value" ):
630- float_frame .add (float_frame .iloc [0 ], fill_value = 3 )
631-
632- with pytest .raises (NotImplementedError , match = "fill_value" ):
633- float_frame .add (float_frame .iloc [0 ], axis = "index" , fill_value = 3 )
634-
635629 @pytest .mark .parametrize ("op" , ["add" , "sub" , "mul" , "mod" ])
636630 def test_arith_flex_series_ops (self , simple_frame , op ):
637631 # after arithmetic refactor, add truediv here
@@ -665,19 +659,6 @@ def test_arith_flex_series_broadcasting(self, any_real_numpy_dtype):
665659 result = df .div (df [0 ], axis = "index" )
666660 tm .assert_frame_equal (result , expected )
667661
668- def test_arith_flex_zero_len_raises (self ):
669- # GH 19522 passing fill_value to frame flex arith methods should
670- # raise even in the zero-length special cases
671- ser_len0 = Series ([], dtype = object )
672- df_len0 = DataFrame (columns = ["A" , "B" ])
673- df = DataFrame ([[1 , 2 ], [3 , 4 ]], columns = ["A" , "B" ])
674-
675- with pytest .raises (NotImplementedError , match = "fill_value" ):
676- df .add (ser_len0 , fill_value = "E" )
677-
678- with pytest .raises (NotImplementedError , match = "fill_value" ):
679- df_len0 .sub (df ["A" ], axis = None , fill_value = 3 )
680-
681662 def test_flex_add_scalar_fill_value (self ):
682663 # GH#12723
683664 dat = np .array ([0 , 1 , np .nan , 3 , 4 , 5 ], dtype = "float" )
0 commit comments