File: manage_tests.patch

package info (click to toggle)
scipy 1.16.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 234,864 kB
  • sloc: cpp: 503,162; python: 344,795; ansic: 195,670; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 855; makefile: 790; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (244 lines) | stat: -rw-r--r-- 9,687 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
Index: scipy/scipy/linalg/tests/test_lapack.py
===================================================================
--- scipy.orig/scipy/linalg/tests/test_lapack.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/linalg/tests/test_lapack.py	2025-10-10 11:25:55.349201190 +0200
@@ -1113,7 +1113,7 @@
 
         eig, _, info = heevd(a)
         assert_(info == 0)
-        assert_allclose(eig, eig_gvd, rtol=1e-4)
+        assert_allclose(eig, eig_gvd, rtol=2e-4)
 
 
 def test_tzrzf():
Index: scipy/scipy/interpolate/tests/test_fitpack.py
===================================================================
--- scipy.orig/scipy/interpolate/tests/test_fitpack.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/interpolate/tests/test_fitpack.py	2025-10-10 11:25:55.350706748 +0200
@@ -7,6 +7,7 @@
 )
 from pytest import raises as assert_raises
 import pytest
+import platform
 from scipy._lib._testutils import check_free_memory
 
 from scipy.interpolate import RectBivariateSpline
@@ -289,6 +290,7 @@
     def test_order0_diff(self):
         assert_raises(ValueError, splder, self.spl, 4)
 
+    @pytest.mark.skipif(platform.machine().startswith('arm'), reason="test known to fail on armel")
     def test_kink(self):
         # Should refuse to differentiate splines with kinks
 
Index: scipy/scipy/optimize/tests/test_linprog.py
===================================================================
--- scipy.orig/scipy/optimize/tests/test_linprog.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/optimize/tests/test_linprog.py	2025-10-10 11:25:55.351831968 +0200
@@ -15,6 +15,7 @@
 from scipy.linalg import LinAlgWarning
 import scipy.sparse
 import pytest
+import platform
 
 has_umfpack = True
 try:
@@ -613,6 +614,7 @@
         if do_presolve:
             assert_equal(res.nit, 0)
 
+    @pytest.mark.skipif(platform.machine().startswith('arm'), reason="test known to fail on armel")
     @pytest.mark.thread_unsafe
     def test_bounds_infeasible_2(self):
 
Index: scipy/scipy/special/tests/test_round.py
===================================================================
--- scipy.orig/scipy/special/tests/test_round.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/special/tests/test_round.py	2025-10-10 11:25:55.352971726 +0200
@@ -1,8 +1,14 @@
 import numpy as np
 import pytest
+import platform
 
 from scipy.special import _test_internal
 
+machine=platform.machine()
+if ( machine.startswith('arm') or
+     machine=='alpha' or
+     machine=='parisc64' ):
+    pytest.skip("rounding tests known to fail on armel, alpha and hppa", allow_module_level=True)
 
 @pytest.mark.fail_slow(20)
 @pytest.mark.skipif(not _test_internal.have_fenv(), reason="no fenv()")
Index: scipy/scipy/stats/tests/test_stats.py
===================================================================
--- scipy.orig/scipy/stats/tests/test_stats.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/stats/tests/test_stats.py	2025-10-10 11:25:55.355400440 +0200
@@ -7,6 +7,7 @@
     Additional tests by a host of SciPy developers.
 """
 import os
+import platform
 import re
 import warnings
 from collections import namedtuple
@@ -803,6 +804,7 @@
     [1] 1.701815e-09
     """
 
+    @pytest.mark.skipif(platform.machine()=='ppc', reason="test known to fail on powerpc")
     def test_basic(self):
         fisher_exact = stats.fisher_exact
 
Index: scipy/scipy/signal/tests/test_spectral.py
===================================================================
--- scipy.orig/scipy/signal/tests/test_spectral.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/signal/tests/test_spectral.py	2025-10-10 11:25:55.357699870 +0200
@@ -6,6 +6,7 @@
                            assert_array_almost_equal_nulp, suppress_warnings)
 import pytest
 from pytest import raises as assert_raises
+import platform
 
 from scipy import signal
 from scipy._lib._array_api import xp_assert_close
@@ -360,6 +361,7 @@
                      detrend=lambda seg: signal.detrend(seg, axis=0, type='l'))
         assert_allclose(p, np.zeros_like(p), atol=1e-15)
 
+    @pytest.mark.skipif(platform.machine().startswith('i686'), reason="test known to fail on i386 linux and hurd")
     def test_nd_axis_m1(self):
         x = np.arange(20, dtype=np.float64) + 0.04
         x = x.reshape((2,1,10))
@@ -369,6 +371,7 @@
         f0, p0 = welch(x[0,0,:], nperseg=10)
         assert_allclose(p0[np.newaxis,:], p[1,:], atol=1e-13, rtol=1e-13)
 
+    @pytest.mark.skipif(platform.machine().startswith('i686'), reason="test known to fail on i386 linux and hurd")
     def test_nd_axis_0(self):
         x = np.arange(20, dtype=np.float64) + 0.04
         x = x.reshape((10,2,1))
Index: scipy/scipy/spatial/transform/tests/test_rotation.py
===================================================================
--- scipy.orig/scipy/spatial/transform/tests/test_rotation.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/spatial/transform/tests/test_rotation.py	2025-10-10 11:25:55.358866699 +0200
@@ -1,6 +1,7 @@
 import math
 
 import pytest
+import platform
 
 import numpy as np
 from numpy.testing import assert_equal
Index: scipy/scipy/io/arff/tests/test_arffread.py
===================================================================
--- scipy.orig/scipy/io/arff/tests/test_arffread.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/io/arff/tests/test_arffread.py	2025-10-10 11:25:55.359889250 +0200
@@ -6,10 +6,12 @@
 from io import StringIO
 
 import numpy as np
+import pytest
 
 from numpy.testing import (assert_array_almost_equal,
                            assert_array_equal, assert_equal, assert_)
 from pytest import raises as assert_raises
+import platform
 
 from scipy.io.arff import loadarff
 from scipy.io.arff._arffread import read_header, ParseArffError
@@ -96,7 +98,12 @@
         for i in ['yop', 'yap']:
             assert_array_almost_equal(data[i], expect_missing[i])
 
-
+machine=platform.machine()
+@pytest.mark.skipif(machine=='s390x'
+                    or machine.startswith('ppc')
+                    or machine=='parisc64'
+                    or machine=='sparc64',
+                    reason="test known to fail on s390x, powerpc, ppc64, hppa and sparc64")
 class TestNoData:
     def test_nodata(self):
         # The file nodata.arff has no data in the @DATA section.
Index: scipy/scipy/linalg/tests/test_interpolative.py
===================================================================
--- scipy.orig/scipy/linalg/tests/test_interpolative.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/linalg/tests/test_interpolative.py	2025-10-10 11:25:55.360558769 +0200
@@ -34,6 +34,7 @@
 
 from numpy.testing import (assert_, assert_allclose, assert_equal,
                            assert_array_equal)
+import platform
 import pytest
 from pytest import raises as assert_raises
 
@@ -142,6 +143,7 @@
         norm_2_est = pymatrixid.estimate_spectral_norm(A, rng=rng)
         assert_allclose(norm_2_est, s[0], rtol=1e-6, atol=1e-8)
 
+    @pytest.mark.skipif(platform.machine().startswith('arm'), reason="test known to fail on armhf")
     def test_estimate_spectral_norm_diff(self, A, rng):
         B = A.copy()
         B[:, 0] *= 1.2
Index: scipy/scipy/fft/tests/test_fftlog.py
===================================================================
--- scipy.orig/scipy/fft/tests/test_fftlog.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/fft/tests/test_fftlog.py	2025-10-10 11:25:55.360968322 +0200
@@ -3,6 +3,7 @@
 
 import numpy as np
 import pytest
+import platform
 
 from scipy.fft._fftlog import fht, ifht, fhtoffset
 from scipy.special import poch
@@ -119,6 +120,7 @@
 
 
 
+@pytest.mark.skipif(platform.machine().startswith('mips64'), reason="test known to fail on mips64el")
 @pytest.mark.thread_unsafe
 def test_fht_special_cases(xp):
     rng = np.random.RandomState(3491349965)
Index: scipy/scipy/sparse/csgraph/tests/test_shortest_path.py
===================================================================
--- scipy.orig/scipy/sparse/csgraph/tests/test_shortest_path.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/sparse/csgraph/tests/test_shortest_path.py	2025-10-10 11:25:55.361564968 +0200
@@ -9,6 +9,7 @@
 import scipy.sparse
 from scipy.io import mmread
 import pytest
+import platform
 
 directed_G = np.array([[0, 3, 3, 0, 0],
                        [0, 0, 0, 2, 4],
@@ -419,6 +420,7 @@
     shortest_path(G, method=method)
 
 
+@pytest.mark.skipif(platform.machine().startswith('mips64'), reason="test known to fail on mips64el")
 def test_NaN_warnings():
     with warnings.catch_warnings(record=True) as record:
         shortest_path(np.array([[0, 1], [np.nan, 0]]))
Index: scipy/scipy/stats/tests/test_distributions.py
===================================================================
--- scipy.orig/scipy/stats/tests/test_distributions.py	2025-10-10 11:25:55.371400536 +0200
+++ scipy/scipy/stats/tests/test_distributions.py	2025-10-10 11:25:55.364037554 +0200
@@ -3854,6 +3854,7 @@
         assert_(np.isfinite(s))
         assert_(not np.isfinite(k))
 
+    @pytest.mark.skipif(platform.machine().startswith('mips64'), reason="test known to fail on mips64el")
     def test_moments_warnings(self):
         # no warnings should be generated for dfd = 2, 4, 6, 8 (div by zero)
         with warnings.catch_warnings():
@@ -5884,7 +5885,7 @@
             # for alpha = 1. for linux 32 bit optimize.bisect
             # has some issues for .01 and .99 percentile
             [
-                'piecewise', 1e-11, lambda r: (
+                'piecewise', 2e-10, lambda r: (
                     (r['alpha'] == 1.) &
                     (not is_linux_32) &
                     np.isin(r['pct'], pct_range) &