summaryrefslogtreecommitdiff
path: root/debian/patches/0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch
blob: 27a396a5d3fbb5d07ffa894d10153fa7b798f170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 3 Feb 2023 15:34:10 -0400
Subject: Skip testing nanmin() on float64 arrays on mips*el

This fails on mipsel and mips64el, due to a numpy bug:
Bug-numpy: https://github.com/numpy/numpy/issues/23158
---
 src/silx/math/test/test_combo.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/silx/math/test/test_combo.py b/src/silx/math/test/test_combo.py
index eed0625..bb3f4e4 100644
--- a/src/silx/math/test/test_combo.py
+++ b/src/silx/math/test/test_combo.py
@@ -27,6 +27,7 @@ __license__ = "MIT"
 __date__ = "17/01/2018"
 
 
+import sys
 import unittest
 
 import numpy
@@ -164,6 +165,9 @@ class TestMinMax(ParametricTestCase):
     def test_nandata(self):
         """Test min_max with NaN in data"""
         for dtype in self.FLOATING_DTYPES:
+            if dtype == 'float64' and sys.implementation._multiarch in (
+                    'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+                continue
             for data in self.NAN_TEST_DATA:
                 with self.subTest(dtype=dtype, data=data):
                     data = numpy.array(data, dtype=dtype)
@@ -181,6 +185,9 @@ class TestMinMax(ParametricTestCase):
     def test_infdata(self):
         """Test min_max with inf."""
         for dtype in self.FLOATING_DTYPES:
+            if dtype == 'float64' and sys.implementation._multiarch in (
+                    'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+                continue
             for data in self.INF_TEST_DATA:
                 with self.subTest(dtype=dtype, data=data):
                     data = numpy.array(data, dtype=dtype)