File: mips_armel_ignore_nonconverge.patch

package info (click to toggle)
statsmodels 0.14.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,956 kB
  • sloc: python: 254,365; f90: 612; sh: 560; javascript: 337; asm: 156; makefile: 145; ansic: 32; xml: 9
file content (29 lines) | stat: -rw-r--r-- 1,118 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
Description: Ignore a failure to converge on mipsel and armel

(Seen to fail in 0.13.5+dfsg-5, twice on mipsel, and in 0.14.0 on armel.
Not a plain mark.xfail to not accept "converged" to the wrong answer.)

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

--- a/statsmodels/stats/tests/test_corrpsd.py
+++ b/statsmodels/stats/tests/test_corrpsd.py
@@ -5,6 +5,8 @@ Created on Mon May 27 12:07:02 2013
 Author: Josef Perktold
 """
 import warnings
+import subprocess
+debian_arch = subprocess.run(["dpkg","--print-architecture"],capture_output=True,encoding='utf-8').stdout.strip()
 
 import numpy as np
 from numpy.testing import assert_almost_equal, assert_allclose
@@ -330,6 +332,9 @@ class Test_Factor:
 
         mat_dense = dense_rslt.corr.to_matrix()
         mat_sparse = sparse_rslt.corr.to_matrix()
+        if (debian_arch.startswith('mips') or debian_arch=='armel') and not sparse_rslt.Converged:
+            warnings.warn("ignoring non-convergence")
+            pytest.xfail()
 
         assert dense_rslt.Converged is sparse_rslt.Converged
         assert dense_rslt.Converged is True