diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index dbcf21f778cbf..6548422c5d2b7 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -77,11 +77,6 @@ def parser(request): return request.param -@pytest.fixture(params=list(_unary_math_ops) if NUMEXPR_INSTALLED else []) -def unary_fns_for_ne(request): - return request.param - - def _eval_single_bin(lhs, cmp1, rhs, engine): c = _binary_ops_dict[cmp1] if ENGINES[engine].has_neg_frac: @@ -1579,12 +1574,14 @@ def eval(self, *args, **kwargs): kwargs["level"] = kwargs.pop("level", 0) + 1 return pd.eval(*args, **kwargs) - def test_unary_functions(self, unary_fns_for_ne): + @pytest.mark.skipif( + not NUMEXPR_INSTALLED, reason="Unary ops only implemented for numexpr" + ) + @pytest.mark.parametrize("fn", _unary_math_ops) + def test_unary_functions(self, fn): df = DataFrame({"a": np.random.randn(10)}) a = df.a - fn = unary_fns_for_ne - expr = f"{fn}(a)" got = self.eval(expr) with np.errstate(all="ignore"): diff --git a/pyproject.toml b/pyproject.toml index e5b50a6705a99..a1feba998bc50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,7 @@ disable = [ # sync minversion with pyproject.toml & install.rst minversion = "6.0" addopts = "--strict-data-files --strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml" +empty_parameter_set_mark = "fail_at_collect" xfail_strict = true testpaths = "pandas" doctest_optionflags = [