@@ -925,8 +925,8 @@ def test_binop_other(self, op, value, dtype, switch_numexpr_min_elements):
925
925
(operator .mul , "bool" ),
926
926
}
927
927
928
- e = DummyElement (value , dtype )
929
- s = DataFrame ({"A" : [e .value , e .value ]}, dtype = e .dtype )
928
+ elem = DummyElement (value , dtype )
929
+ df = DataFrame ({"A" : [elem .value , elem .value ]}, dtype = elem .dtype )
930
930
931
931
invalid = {
932
932
(operator .pow , "<M8[ns]" ),
@@ -960,7 +960,7 @@ def test_binop_other(self, op, value, dtype, switch_numexpr_min_elements):
960
960
961
961
with pytest .raises (TypeError , match = msg ):
962
962
with tm .assert_produces_warning (warn ):
963
- op (s , e .value )
963
+ op (df , elem .value )
964
964
965
965
elif (op , dtype ) in skip :
966
966
@@ -971,19 +971,17 @@ def test_binop_other(self, op, value, dtype, switch_numexpr_min_elements):
971
971
else :
972
972
warn = None
973
973
with tm .assert_produces_warning (warn ):
974
- op (s , e .value )
974
+ op (df , elem .value )
975
975
976
976
else :
977
977
msg = "operator '.*' not implemented for .* dtypes"
978
978
with pytest .raises (NotImplementedError , match = msg ):
979
- op (s , e .value )
979
+ op (df , elem .value )
980
980
981
981
else :
982
- # FIXME: Since dispatching to Series, this test no longer
983
- # asserts anything meaningful
984
982
with tm .assert_produces_warning (None ):
985
- result = op (s , e .value ).dtypes
986
- expected = op (s , value ).dtypes
983
+ result = op (df , elem .value ).dtypes
984
+ expected = op (df , value ).dtypes
987
985
tm .assert_series_equal (result , expected )
988
986
989
987
@@ -1240,9 +1238,7 @@ def test_combineFrame(self, float_frame, mixed_float_frame, mixed_int_frame):
1240
1238
added = float_frame + mixed_int_frame
1241
1239
_check_mixed_float (added , dtype = "float64" )
1242
1240
1243
- def test_combine_series (
1244
- self , float_frame , mixed_float_frame , mixed_int_frame , datetime_frame
1245
- ):
1241
+ def test_combine_series (self , float_frame , mixed_float_frame , mixed_int_frame ):
1246
1242
1247
1243
# Series
1248
1244
series = float_frame .xs (float_frame .index [0 ])
@@ -1272,17 +1268,18 @@ def test_combine_series(
1272
1268
added = mixed_float_frame + series .astype ("float16" )
1273
1269
_check_mixed_float (added , dtype = {"C" : None })
1274
1270
1275
- # FIXME: don't leave commented-out
1276
- # these raise with numexpr .....as we are adding an int64 to an
1277
- # uint64....weird vs int
1278
-
1279
- # added = mixed_int_frame + (100*series).astype(' int64')
1280
- # _check_mixed_int(added, dtype = {"A": 'int64', "B": 'float64', "C":
1281
- # 'int64', "D": 'int64'} )
1282
- # added = mixed_int_frame + (100*series).astype('int32')
1283
- # _check_mixed_int( added, dtype = {"A": ' int32' , "B": ' float64' , "C":
1284
- # 'int32', "D": 'int64'} )
1271
+ # these used to raise with numexpr as we are adding an int64 to an
1272
+ # uint64 ....weird vs int
1273
+ added = mixed_int_frame + ( 100 * series ). astype ( "int64" )
1274
+ _check_mixed_int (
1275
+ added , dtype = { "A" : "int64" , "B" : "float64" , "C" : " int64" , "D" : "int64" }
1276
+ )
1277
+ added = mixed_int_frame + ( 100 * series ). astype ( "int32" )
1278
+ _check_mixed_int (
1279
+ added , dtype = {"A" : " int32" , "B" : " float64" , "C" : "int32" , "D" : "int64" }
1280
+ )
1285
1281
1282
+ def test_combine_timeseries (self , datetime_frame ):
1286
1283
# TimeSeries
1287
1284
ts = datetime_frame ["A" ]
1288
1285
0 commit comments