]> git.cworth.org Git - notmuch-old/blob - test/T391-python-cffi.sh
lib/message: move xapian call inside try/catch block in _n_m_delete
[notmuch-old] / 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 [ $NOTMUCH_HAVE_PYTHON3_CFFI -eq 0 -o $NOTMUCH_HAVE_PYTHON3_PYTEST -eq 0 ]; then
6     test_done
7 fi
8
9
10 test_begin_subtest "python cffi tests (NOTMUCH_CONFIG set)"
11 pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
12 printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
13 test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
14
15 test_begin_subtest "python cffi tests (NOTMUCH_CONFIG unset)"
16 pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
17 printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
18 unset NOTMUCH_CONFIG
19 test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)"
20 test_done