File: python3

package info (click to toggle)
python-scipy 1.1.0-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 93,828 kB
  • sloc: python: 156,854; ansic: 82,925; fortran: 80,777; cpp: 7,505; makefile: 427; sh: 294
file content (56 lines) | stat: -rwxr-xr-x 1,604 bytes parent folder | download
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
#!/bin/sh
set -efu

PYS=${PYS:-"$(py3versions -r 2>/dev/null)"}
TESTMODE=${TESTMODE:-full}
TESTPKG=${TESTPKG:-scipy}
export HOME=$AUTOPKGTEST_TMP
export TMPDIR=$AUTOPKGTEST_TMP

cd "$AUTOPKGTEST_TMP"
#nosetest does not handle knowfailures
cat << EOF > runtest.py
import $TESTPKG
# add failures to skip here
skip = [
# i386 failures
"special.tests.test_mpmath.TestSystematic.test_pcfw",
"special.tests.test_orthogonal.test_roots_jacobi",
"linalg.tests.test_solvers.test_solve_generalized_discrete_are",
# fails with atlas
"linalg.tests.test_solvers.test_solve_discrete_are",
# postscriptum on Bug#919929
"sparse.tests.test_sparsetools.TestInt32Overflow.test_matvecs",
"sparse.tests.test_sparsetools.TestInt32Overflow.test_dia_matvec",
]

junit = "$TMPDIR/junit.xml"
r= $TESTPKG.test(label='$TESTMODE', verbose=2, extra_argv=["--junit-xml=" + junit])
import xml.etree.ElementTree as ET
ET.parse(junit)
tree =ET.parse(junit)
root = tree.getroot()
errors = []
for testcase in root:
    for result in testcase:
        if result.tag in ("failure", "error"):
            testid = testcase.attrib["classname"].split("scipy.")[-1] + "." + testcase.attrib["name"]
            print("skipped:", testid)
            if testid in skip:
                del skip[skip.index(testid)]
            else:
                print("failed:", testid)
                errors.append(testid)

print("#errors: %d" % len(errors))
for s in skip:
    print("unused skips:", s)
assert len(errors) == 0
EOF


for py in $PYS; do
    echo "=== Testing: $py $TESTPKG ==="
    $py runtest.py 2>&1
    echo "=== Done: $py $TESTPKG ==="
done