]> git.cworth.org Git - notmuch/blob - test/T391-python-cffi.sh
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / test / T391-python-cffi.sh
1 #!/usr/bin/env bash
2 test_description="python bindings (pytest)"
3 . $(dirname "$0")/test-lib.sh || exit 1
4
5 if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then
6     test_done
7 fi
8
9 if [ "${NOTMUCH_HAVE_PYTHON3_CFFI-0}" = "0" -o "${NOTMUCH_HAVE_PYTHON3_PYTEST-0}" = "0" ]; then
10     test_done
11 fi
12
13 test_begin_subtest "python cffi tests (NOTMUCH_CONFIG set)"
14 pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
15 printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
16 test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
17
18 test_begin_subtest "python cffi tests (NOTMUCH_CONFIG unset)"
19 pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
20 printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
21 unset NOTMUCH_CONFIG
22 test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
23 test_done