File: run-unit-test

package info (click to toggle)
mypy 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,728 kB
  • sloc: python: 90,748; cpp: 11,306; ansic: 4,807; makefile: 242; sh: 19
file content (30 lines) | stat: -rwxr-xr-x 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
#!/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 ./

MYPY_TEST_PREFIX=${START} pytest-3 -v --pyargs mypy

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