@@ -314,11 +314,11 @@ def test_rpow_one_to_na(self):
314
314
315
315
class TestComparisonOps (BaseOpsUtil ):
316
316
317
- def _compare_other (self , s , data , op_name , other ):
317
+ def _compare_other (self , data , op_name , other ):
318
318
op = self .get_op_from_name (op_name )
319
319
320
320
# array
321
- result = op (s , other )
321
+ result = pd . Series ( op (data , other ) )
322
322
expected = pd .Series (op (data ._data , other ))
323
323
324
324
# fill the nan locations
@@ -340,14 +340,12 @@ def _compare_other(self, s, data, op_name, other):
340
340
341
341
def test_compare_scalar (self , data , all_compare_operators ):
342
342
op_name = all_compare_operators
343
- s = pd .Series (data )
344
- self ._compare_other (s , data , op_name , 0 )
343
+ self ._compare_other (data , op_name , 0 )
345
344
346
345
def test_compare_array (self , data , all_compare_operators ):
347
346
op_name = all_compare_operators
348
- s = pd .Series (data )
349
347
other = pd .Series ([0 ] * len (data ))
350
- self ._compare_other (s , data , op_name , other )
348
+ self ._compare_other (data , op_name , other )
351
349
352
350
353
351
class TestCasting (object ):
0 commit comments