pytest integration for the notmuch test suite

David Bremner david at tethera.net
Sun Mar 25 10:40:31 PDT 2018


Here's one approach. A given pytest "file" can be embedded in a normal
(for us) test script.  As I write this, it occurs to me you might be
thinking of embedding unit tests in the bindings source files; that
would be easy to add, something along the lines of

test_begin_subtest "python bindings embedded unit tests"
test_expect_success "${NOTMUCH_PYTEST} ${NOTMUCH_SRCDIR}/bindings/python/notmuch"

You could also run one source file of tests with

test_begin_subtest "python bindings foo tests"
test_expect_success "${NOTMUCH_PYTEST} ${NOTMUCH_SRCDIR}/bindings/python/notmuch/test_foo.py"

that would give a less granular result, at the cost of more boilerplate



More information about the notmuch mailing list