-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·49 lines (42 loc) · 866 Bytes
/
test.sh
File metadata and controls
executable file
·49 lines (42 loc) · 866 Bytes
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/sh
# Runs the unit tests.
#
# Usage examples:
# bin/test.sh
# bin/test.sh tests/test_basics.py
# bin/test.sh tests/test_convert.py::TestConvert::test2DStringArray
set -e
dir=$(dirname "$0")
cd "$dir/.."
echo
echo "----------------------"
echo "| Running unit tests |"
echo "----------------------"
if [ $# -gt 0 ]
then
uv run python -m pytest -v -p no:faulthandler $@
else
uv run python -m pytest -v -p no:faulthandler tests/
fi
jpypeCode=$?
echo
echo "-----------------------------"
echo "| Running integration tests |"
echo "-----------------------------"
itCode=0
for t in tests/it/*.py
do
uv run python "$t"
code=$?
printf -- "--> %s " "$t"
if [ "$code" -eq 0 ]
then
echo "[OK]"
else
echo "[FAILED]"
itCode=$code
fi
done
test "$jpypeCode" -ne 0 && exit "$jpypeCode"
test "$itCode" -ne 0 && exit "$itCode"
exit 0