@@ -1609,22 +1609,20 @@ def eval(self, *args, **kwargs):
1609
1609
kwargs ["level" ] = kwargs .pop ("level" , 0 ) + 1
1610
1610
return pd .eval (* args , ** kwargs )
1611
1611
1612
- @pytest .mark .skipif (
1613
- not NUMEXPR_INSTALLED , reason = "Unary ops only implemented for numexpr"
1614
- )
1612
+ @pytest .mark .filterwarnings ("ignore::RuntimeWarning" )
1615
1613
@pytest .mark .parametrize ("fn" , _unary_math_ops )
1616
- def test_unary_functions (self , fn ):
1614
+ def test_unary_functions (self , fn , engine , parser ):
1617
1615
df = DataFrame ({"a" : np .random .default_rng (2 ).standard_normal (10 )})
1618
1616
a = df .a
1619
1617
1620
1618
expr = f"{ fn } (a)"
1621
- got = self .eval (expr )
1619
+ got = self .eval (expr , engine = engine , parser = parser )
1622
1620
with np .errstate (all = "ignore" ):
1623
1621
expect = getattr (np , fn )(a )
1624
1622
tm .assert_series_equal (got , expect , check_names = False )
1625
1623
1626
1624
@pytest .mark .parametrize ("fn" , _binary_math_ops )
1627
- def test_binary_functions (self , fn ):
1625
+ def test_binary_functions (self , fn , engine , parser ):
1628
1626
df = DataFrame (
1629
1627
{
1630
1628
"a" : np .random .default_rng (2 ).standard_normal (10 ),
@@ -1635,7 +1633,7 @@ def test_binary_functions(self, fn):
1635
1633
b = df .b
1636
1634
1637
1635
expr = f"{ fn } (a, b)"
1638
- got = self .eval (expr )
1636
+ got = self .eval (expr , engine = engine , parser = parser )
1639
1637
with np .errstate (all = "ignore" ):
1640
1638
expect = getattr (np , fn )(a , b )
1641
1639
tm .assert_almost_equal (got , expect , check_names = False )
0 commit comments