2019-10-20 04:10:24 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
test_description="python bindings (pytest)"
|
|
|
|
. $(dirname "$0")/test-lib.sh || exit 1
|
|
|
|
|
2023-04-09 16:26:26 +02:00
|
|
|
if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then
|
|
|
|
test_done
|
|
|
|
fi
|
|
|
|
|
2023-04-09 16:26:23 +02:00
|
|
|
if [ "${NOTMUCH_HAVE_PYTHON3_CFFI-0}" = "0" -o "${NOTMUCH_HAVE_PYTHON3_PYTEST-0}" = "0" ]; then
|
2019-10-20 04:10:24 +02:00
|
|
|
test_done
|
|
|
|
fi
|
|
|
|
|
2021-10-30 18:22:35 +02:00
|
|
|
test_begin_subtest "python cffi tests (NOTMUCH_CONFIG set)"
|
2020-05-22 03:03:59 +02:00
|
|
|
pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
|
2019-10-20 04:10:24 +02:00
|
|
|
printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
|
2021-01-04 00:35:13 +01:00
|
|
|
test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
|
2021-10-30 18:22:35 +02:00
|
|
|
|
|
|
|
test_begin_subtest "python cffi tests (NOTMUCH_CONFIG unset)"
|
|
|
|
pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
|
|
|
|
printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
|
|
|
|
unset NOTMUCH_CONFIG
|
|
|
|
test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
|
2019-10-20 04:10:24 +02:00
|
|
|
test_done
|