@@ -628,12 +628,6 @@ def test_arith_flex_frame_corner(self, float_frame):
628628 expected = float_frame .sort_index () * np .nan
629629 tm .assert_frame_equal (result , expected )
630630
631- with pytest .raises (NotImplementedError , match = "fill_value" ):
632- float_frame .add (float_frame .iloc [0 ], fill_value = 3 )
633-
634- with pytest .raises (NotImplementedError , match = "fill_value" ):
635- float_frame .add (float_frame .iloc [0 ], axis = "index" , fill_value = 3 )
636-
637631 @pytest .mark .parametrize ("op" , ["add" , "sub" , "mul" , "mod" ])
638632 def test_arith_flex_series_ops (self , simple_frame , op ):
639633 # after arithmetic refactor, add truediv here
@@ -667,19 +661,6 @@ def test_arith_flex_series_broadcasting(self, any_real_numpy_dtype):
667661 result = df .div (df [0 ], axis = "index" )
668662 tm .assert_frame_equal (result , expected )
669663
670- def test_arith_flex_zero_len_raises (self ):
671- # GH 19522 passing fill_value to frame flex arith methods should
672- # raise even in the zero-length special cases
673- ser_len0 = Series ([], dtype = object )
674- df_len0 = DataFrame (columns = ["A" , "B" ])
675- df = DataFrame ([[1 , 2 ], [3 , 4 ]], columns = ["A" , "B" ])
676-
677- with pytest .raises (NotImplementedError , match = "fill_value" ):
678- df .add (ser_len0 , fill_value = "E" )
679-
680- with pytest .raises (NotImplementedError , match = "fill_value" ):
681- df_len0 .sub (df ["A" ], axis = None , fill_value = 3 )
682-
683664 def test_flex_add_scalar_fill_value (self ):
684665 # GH#12723
685666 dat = np .array ([0 , 1 , np .nan , 3 , 4 , 5 ], dtype = "float" )
0 commit comments