From: Debian Science Team Date: Sun, 11 Oct 2020 17:08:21 +0000 (+0100) Subject: test_float128 X-Git-Tag: archive/raspbian/2019.2.0_git20200629.946dbd3-8+rpi1~1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a13e837b780934ece5f043644d731a0620e5e22d;p=dolfin.git test_float128 =================================================================== Gbp-Pq: Name test_float128.patch --- 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),