Skip to content

Commit 7952e1d

Browse files
committed
Miniexpr is still not an official path for windows
1 parent 1dfd051 commit 7952e1d

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

tests/ndarray/test_lazyexpr.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import math
99
import pathlib
10+
import sys
1011

1112
import numpy as np
1213
import pytest
@@ -1547,8 +1548,17 @@ def wrapped_set_pref_expr(self, expression, inputs, fp_accuracy, aux_reduc=None,
15471548

15481549
np.testing.assert_equal(left[...], right[...])
15491550
np.testing.assert_equal(left[...], na - 1)
1550-
assert captured["calls"] >= 1
1551-
assert any("-1" in expr for expr in captured["exprs"])
1551+
miniexpr_expected = not (
1552+
sys.platform == "win32"
1553+
and not lazyexpr_mod._MINIEXPR_WINDOWS_OVERRIDE
1554+
and np.issubdtype(na.dtype, np.integer)
1555+
)
1556+
if miniexpr_expected:
1557+
assert captured["calls"] >= 1
1558+
assert any("-1" in expr for expr in captured["exprs"])
1559+
else:
1560+
# Integer dtypes on Windows skip miniexpr by policy unless explicitly overridden.
1561+
assert captured["calls"] == 0
15521562
finally:
15531563
lazyexpr_mod.try_miniexpr = old_try_miniexpr
15541564

0 commit comments

Comments
 (0)