| 1 |
#!/bin/sh |
| 2 |
# Run the upstream pytest suite against the installed package. |
| 3 |
set -eu |
| 4 |
|
| 5 |
cp -a tests "$AUTOPKGTEST_TMP/" |
| 6 |
cd "$AUTOPKGTEST_TMP" |
| 7 |
|
| 8 |
export DJANGO_SETTINGS_MODULE=tests.settings |
| 9 |
export PYTHONPATH="$PWD" |
| 10 |
|
| 11 |
# test_template_exists in test_logic.py asserts that |
| 12 |
# `$PWD/django_json_widget/templates/...` exists, which is only true when |
| 13 |
# pytest is run from an upstream source checkout. In autopkgtest the package |
| 14 |
# is installed system-wide and there is no such directory next to the tests, |
| 15 |
# so the assertion is meaningless here -- skip just this one case. |
| 16 |
python3 -m pytest -v tests \ |
| 17 |
--deselect 'tests/test_logic.py::JSONEditorWidgetTemplateRenderingTests::test_template_exists' |