File: pytest

package info (click to toggle)
jupyter-server 2.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,108 kB
  • sloc: python: 21,577; makefile: 186; sh: 25; javascript: 14
file content (42 lines) | stat: -rwxr-xr-x 1,382 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
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

set -e

cp -a pyproject.toml tests "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

# In the lxc autopkgtest environment, /tmp/pytest-of-test and /home
# are on different mounts, causing send2trash to raise an OSError in
# some of the tests.  $AUTOPKGTEST_TMP is on yet a different mount!
# So we set HOME to be in /tmp.  (This is a shortcoming of send2trash;
# see https://github.com/arsenetar/send2trash/issues/67.)
mkdir /tmp/home
export HOME=/tmp/home

DEFAULT_PY=$(py3versions -d)

# riscv64 fails on the restarting kernel test
arch=$(dpkg --print-architecture)
excludes=
if [ $arch = riscv64 ]
then
    excludes="--deselect tests/services/sessions/test_api.py::test_restart_kernel"
fi

for py in $(py3versions -s)
do
    echo "Testing with $py:"
    if [ $py = $DEFAULT_PY ]
    then
	echo "Running all non-integration tests with $py"
	$py -m pytest -v $excludes tests
	echo "Running all integration tests with $py"
	$py -m pytest -v --integration_tests=true $timeout tests/unix_sockets/test_serverapp_integration.py
    else
	# The deselected test breaks because it executes a /usr/bin/python3
	# script in the same pytest process, causing conflicting libraries
	# to be loaded.  We cannot run the integration tests in this case,
	# either.
	$py -m pytest -v --color=no $timeout --deselect=tests/extension/test_entrypoint.py::test_server_extension_list tests
    fi
done