From eccbb14dc26da81bdb61ed67ddd2c0e445f66c23 Mon Sep 17 00:00:00 2001 From: Brock Date: Mon, 26 Oct 2020 16:33:43 -0700 Subject: [PATCH 1/2] CI: xfail windows numexpr test --- pandas/tests/computation/test_eval.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index 3869bf8f7ddcd..7814a45d8f871 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -9,6 +9,8 @@ from numpy.random import rand, randint, randn import pytest +from pandas.compat import is_platform_windows +from pandas.compat.numpy import np_version_under1p17 from pandas.errors import PerformanceWarning import pandas.util._test_decorators as td @@ -197,7 +199,22 @@ def test_simple_cmp_ops(self, cmp_op): self.check_simple_cmp_op(lhs, cmp_op, rhs) @pytest.mark.parametrize("op", _good_arith_ops) - def test_binary_arith_ops(self, op, lhs, rhs): + def test_binary_arith_ops(self, op, lhs, rhs, request): + + if ( + op == "/" + and isinstance(lhs, DataFrame) + and isinstance(rhs, DataFrame) + and not lhs.isna().any().any() + and rhs.shape == (10, 5) + and np_version_under1p17 + and is_platform_windows() + ): + mark = pytest.mark.xfail( + reason="GH#37328 floating point precision on Windows builds" + ) + request.node.add_marker(mark) + self.check_binary_arith_op(lhs, op, rhs) def test_modulus(self, lhs, rhs): From e8445a2af32a231149a54cfba1eb0dcbd0bf3f7d Mon Sep 17 00:00:00 2001 From: Brock Date: Mon, 26 Oct 2020 17:38:14 -0700 Subject: [PATCH 2/2] tighten condition --- pandas/tests/computation/test_eval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index 7814a45d8f871..a4f1b1828bbc6 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -209,6 +209,7 @@ def test_binary_arith_ops(self, op, lhs, rhs, request): and rhs.shape == (10, 5) and np_version_under1p17 and is_platform_windows() + and compat.PY38 ): mark = pytest.mark.xfail( reason="GH#37328 floating point precision on Windows builds"