From a4cd2e5e486d015c53efa843a2c9f44393f4d2a6 Mon Sep 17 00:00:00 2001 From: Debian Science Team Date: Wed, 18 Nov 2020 16:09:19 +0000 Subject: [PATCH] test_float128 =================================================================== Gbp-Pq: Name test_float128.patch --- python/test/unit/la/test_vector.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/test/unit/la/test_vector.py b/python/test/unit/la/test_vector.py index 10c42db..a2ac58e 100755 --- a/python/test/unit/la/test_vector.py +++ b/python/test/unit/la/test_vector.py @@ -398,13 +398,17 @@ class TestVectorForAnyBackend: xfail_type = pytest.mark.xfail(strict=True, raises=TypeError) xfail_type_py3 = pytest.mark.xfail(strict=True, raises=TypeError) - + # some systems (32 bit arches) do not have numpy.float128 + try: + test_float128 = numpy.float128(42.0) + except AttributeError: + test_float128 = numpy.longdouble(42.0) @pytest.mark.parametrize("operand", [int(42), 42.0, numpy.sin(1.0), numpy.float(42.0), numpy.float64(42.0), numpy.float_(42.0), numpy.int(42.0), numpy.long(42.0), numpy.float16(42.0), numpy.float16(42.0), - numpy.float32(42.0), numpy.float128(42.0), + numpy.float32(42.0), test_float128, numpy.longfloat(42.0), numpy.int8(42.0), numpy.int16(42.0), numpy.int32(42.0), numpy.intc(42.0), numpy.longdouble(42.0), -- 2.30.2