@@ -237,35 +237,24 @@ def testit():
237
237
expr .set_numexpr_threads ()
238
238
testit ()
239
239
240
- @pytest .mark .parametrize (
241
- "opname,op_str" ,
242
- [
243
- ("gt" , ">" ),
244
- ("lt" , "<" ),
245
- ("ge" , ">=" ),
246
- ("le" , "<=" ),
247
- ("eq" , "==" ),
248
- ("ne" , "!=" ),
249
- ],
250
- )
251
240
@pytest .mark .parametrize (
252
241
"left_fix,right_fix" , [("_array" , "_array2" ), ("_array_mixed" , "_array_mixed2" )]
253
242
)
254
- def test_comparison_ops (self , request , opname , op_str , left_fix , right_fix ):
243
+ def test_comparison_ops (self , request , comparison_op , left_fix , right_fix ):
255
244
left = request .getfixturevalue (left_fix )
256
245
right = request .getfixturevalue (right_fix )
257
246
258
247
def testit ():
259
248
f12 = left + 1
260
249
f22 = right + 1
261
250
262
- op = getattr ( operator , opname )
251
+ op = comparison_op
263
252
264
253
result = expr .evaluate (op , left , f12 , use_numexpr = True )
265
254
expected = expr .evaluate (op , left , f12 , use_numexpr = False )
266
255
tm .assert_numpy_array_equal (result , expected )
267
256
268
- result = expr ._can_use_numexpr (op , op_str , right , f22 , "evaluate" )
257
+ result = expr ._can_use_numexpr (op , op , right , f22 , "evaluate" )
269
258
assert not result
270
259
271
260
with option_context ("compute.use_numexpr" , False ):
0 commit comments