File: run-unit-test

package info (click to toggle)
mypy 1.19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,412 kB
  • sloc: python: 114,754; ansic: 13,343; cpp: 11,380; makefile: 257; sh: 28
file content (49 lines) | stat: -rwxr-xr-x 1,933 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
#!/bin/bash
set -ex

pkg=mypy

START="$(dirname "$(dirname "$(dirname "$(readlink -fm "$0")")")")"

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd "$AUTOPKGTEST_TMP"

mypy --help
mypyc --help
stubgen --help
stubtest --help

export TEST_MYPYC=1

rm -Rf mypy mypyc

cp -r /usr/lib/python3/dist-packages/mypy ./
cp -r /usr/lib/python3/dist-packages/mypyc ./
cp ${START}/conftest.py ./
cp -r ${START}/mypyc/test-data ./mypyc/
cp -r ${START}/test-data ./

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export MYPYC_DEBUG_LEVEL=2
export TEST_MYPYC=1

set -e; for v in $(py3versions -vs) ; do
python${v} -m pytest -n $(nproc) -v -o testpaths="mypy/test mypyc/test" -o python_files=test*.py -o python_classes= -o python_functions= -k "not (test_bad_eq_version_check or test_bad_ge_version_check or test_parse_invalid_case or test_parse_invalid_section or test_update_data or testDaemonStatusKillRestartRecheck or testErrorCodeMissingModule or testErrorFromGoogleCloud or testCustomTypeshedDirWithRelativePathDoesNotCrash or testLibraryStubsNotInstalled or testIgnoreImportIfNoPython3StubAvailable or testNoPython3StubAvailable or testAttrsClass_semanal or testRunAsyncMiscTypesInEnvironment)"
done

# testErrorCodeMissingModule: different error message on Debian
# testErrorFromGoogleCloud: different error message on Debian
# testCustomTypeshedDirWithRelativePathDoesNotCrash: ???
# testLibraryStubsNotInstalled: different error message on Debian
# testIgnoreImportIfNoPython3StubAvailable: package 'scribe' in not yet available in Debian
# testNoPython3StubAvailable: different error message on Debian
# testAttrsClass_semanal: ???
# testRunAsyncMiscTypesInEnvironment: ???

rm -Rf mypy/typeshed
/usr/bin/mypy --config-file ${START}/mypy_self_check.ini -p mypy
/usr/bin/mypy --config-file ${START}/mypy_self_check.ini -p mypyc