From 34be7893c4d4a40d8d3851882395239b0639d55c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 30 Oct 2023 07:43:17 -0400 Subject: [PATCH] Skip and document failure of test_equal_zero_nan_NP on recent numpy --- python-pint.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python-pint.spec b/python-pint.spec index 8bc980a..4e795cb 100644 --- a/python-pint.spec +++ b/python-pint.spec @@ -75,7 +75,15 @@ find pint -type f -exec \ %pyproject_save_files pint %check -%pytest +%global numpy_version %(\ + %{python3} -c 'import numpy; print(numpy.__version__)' || echo 0) +# test_equal_zero_nan_NP fails with numpy 1.25.1 +# https://github.com/hgrecco/pint/issues/1825 +%if v"%{numpy_version}" >= v"1.25.1" +k="${k-}${k+ and }not (TestCompareNeutral and test_equal_zero_nan_NP)" +%endif + +%pytest -k "${k-}" %files -n python3-pint -f %{pyproject_files} %{_bindir}/pint-convert