@@ -1051,15 +1051,24 @@ def test_arith_series_with_scalar(self, data, all_arithmetic_operators):
1051
1051
s = pd .Series (data [1 :]) # Avoid zero values for div
1052
1052
self .check_opname (s , op_name , s .iloc [0 ], exc = self .series_scalar_exc )
1053
1053
1054
+ def test_arith_frame_with_scalar (self , data , all_arithmetic_operators ):
1055
+ """ Override to prevent div by zero warning."""
1056
+ # frame & scalar
1057
+ op_name = all_arithmetic_operators
1058
+ df = pd .DataFrame ({"A" : data [1 :]}) # Avoid zero values for div
1059
+ self .check_opname (df , op_name , data [0 ], exc = self .frame_scalar_exc )
1060
+
1054
1061
def test_arith_series_with_array (self , data , all_arithmetic_operators ):
1055
- """ Override because creates Series from list of TensorElements as dtype=object."""
1062
+ """ Override because creates Series from list of TensorElements as
1063
+ dtype=object."""
1056
1064
# ndarray & other series
1057
1065
op_name = all_arithmetic_operators
1058
1066
s = pd .Series (data [1 :]) # Avoid zero values for div
1059
1067
self .check_opname (
1060
1068
s , op_name , pd .Series ([s .iloc [0 ]] * len (s ), dtype = TensorDtype ()), exc = self .series_array_exc
1061
1069
)
1062
1070
1071
+
1063
1072
@pytest .mark .skip (reason = "TensorArray does not error on ops" )
1064
1073
def test_error (self , data , all_arithmetic_operators ):
1065
1074
# other specific errors tested in the TensorArray specific tests
0 commit comments