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
|