depot/third_party/nixpkgs/pkgs/development/python-modules/numpy/disable-failing-long-double-test-Rosetta-2.patch
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

23 lines
898 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py
index 6951d41e4..eefe86ad4 100644
--- a/numpy/core/tests/test_umath.py
+++ b/numpy/core/tests/test_umath.py
@@ -4180,7 +4180,17 @@ def test_against_cmath(self):
)
@pytest.mark.xfail(IS_MUSL, reason="gh23049")
@pytest.mark.xfail(IS_WASM, reason="doesn't work")
- @pytest.mark.parametrize('dtype', [np.complex64, np.complex_, np.longcomplex])
+ @pytest.mark.parametrize('dtype', [
+ np.complex64,
+ np.complex_,
+ pytest.param(
+ np.longcomplex,
+ marks=pytest.mark.skipif(
+ sys.platform == "darwin" and platform.machine() == "x86_64",
+ reason="doesnt work under Rosetta 2",
+ ),
+ ),
+ ])
def test_loss_of_precision(self, dtype):
"""Check loss of precision in complex arc* functions"""