diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py index 8e89622435f26..cb320b096e80f 100644 --- a/pandas/tests/frame/test_arithmetic.py +++ b/pandas/tests/frame/test_arithmetic.py @@ -382,7 +382,8 @@ def test_floordiv_axis0_numexpr_path(self, opname): arr = np.arange(_MIN_ELEMENTS + 100).reshape(_MIN_ELEMENTS // 100 + 1, -1) * 100 df = pd.DataFrame(arr) - assert _USE_NUMEXPR + if _NUMEXPR_INSTALLED: + assert _USE_NUMEXPR df["C"] = 1.0 ser = df[0]