File: upstream-tests

package info (click to toggle)
python-odmantic 1.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,640 kB
  • sloc: python: 8,547; sh: 37; makefile: 34; xml: 13; javascript: 3
file content (46 lines) | stat: -rw-r--r-- 1,754 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
43
44
45
46
#!/bin/bash

set -e -u

cp -a pyproject.toml tests "${AUTOPKGTEST_TMP}"

# Some tests are not successful in the autopkgtest due missing deps but mostly due a missing MongoDB.
PYTEST_OPTIONS="\
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/benchmarks/test_bench_sync.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/fastapi/test_doc_example.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_embedded_model.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_engine.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_engine_reference.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_index.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_query.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_session.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_types.py \
 --ignore ${AUTOPKGTEST_TMP}/tests/integration/test_zoo.py"

for py3vers in $(py3versions -s); do
    echo
    echo "***************************"
    echo "*** Testing with ${py3vers}"
    echo "***************************"
    echo
    cd ${AUTOPKGTEST_TMP} && \
        echo -e "Content of current working folder:\n" && \
        ls -la && \
        echo -e "Running tests...\n" && \
        PYTHONPATH=. "${py3vers}" -m pytest -v ${PYTEST_OPTIONS} \
        -k "not test_session_find \
            and not test_session_find_one \
            and not test_session_count \
            and not test_session_save \
            and not test_session_save_all \
            and not test_session_delete \
            and not test_session_remove \
            and not test_get_first_type_argument_subclassing_on_non_matching_generics \
            and not test_datetime_naive" tests && \
        rm -rf .pytest_cache || exit 1
done

echo

exit 0