Debian Codegraph @

debian/tests/pytest

raw symbols SCIP
1 #!/bin/bash
2 set -e
3
4 export LC_ALL=C.UTF-8
5 export LANG=C.UTF-8
6 PYTEST_OPTIONS="--verbose --timeout-method=signal --timeout=300 --durations=20 --color=no"
7
8 # Run slow tests on amd64 and arm64 only
9 arch=$(dpkg --print-architecture)
10 case $arch in
11 amd64|arm64)
12 PYTEST_OPTIONS="$PYTEST_OPTIONS --runslow"
13 ;;
14 esac
15
16 # This is needed for keras, though that dependency doesn't work right now.
17 export THEANO_FLAGS="base_compiledir=$(pwd)"
18
19 # This is needed for newer versions of OpenSSL
20 export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1
21
22 # The dask tests use the google dns servers as a default ipv6 address
23 # disable exit on error for this command, as ping's failure indicates
24 # that we don't have ipv6
25 set +e
26 ping6 -c 4 2001:4860:4860::8888 2>&1
27 if [ $? -eq 0 ]; then
28 echo "Working ipv6 connectivity"
29 else
30 echo "No external ipv6 connectivity"
31 export DISABLE_IPV6=1
32 fi
33 set -e
34
35 cp pyproject.toml conftest.py $AUTOPKGTEST_TMP
36
37 # FIXME: several tests are tripping on the missing dask_expr raising
38 # FutureWarnings on dask.dataframe module import. Setting configuration
39 # option "dataframe.query-planning" option to False will not raise such
40 # warning, but the way forward would probably be to package dask_expr.
41 HOME="$AUTOPKGTEST_TMP"
42 export HOME
43 mkdir "${HOME}/.config/"
44 echo '{"dataframe": {"query-planning": False}}' > "${HOME}/.config/dask"
45
46 DEBIAN_DIR=$(pwd)/debian
47
48 for py in $(py3versions -s)
49 do
50 cd "$AUTOPKGTEST_TMP"
51 echo "Testing with $py:"
52 $DEBIAN_DIR/run-tests $DEBIAN_DIR/get-test-exclusions autopkgtest $py \
53 -m pytest -m "not avoid_ci" $PYTEST_OPTIONS --pyargs distributed
54 done