Re: pytest integration for the notmuch test suite

2018-03-25 Thread Tomi Ollila
On Sun, Mar 25 2018, David Bremner wrote: > 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

[PATCH 2/3] test: add new test_expect_pytest_success

2018-03-25 Thread David Bremner
As the name suggests, this is something of a cross between test_python (reading a script from stdin) and test expect success. It seemed somewhat redundant to allow our usual kind of file comparison with pytest scripts, although that will make it tougher to compare output with the CLI. ---

[PATCH 1/3] configure: check for pytest binary

2018-03-25 Thread David Bremner
This is to support future use of pytest in the test suite --- configure | 24 1 file changed, 24 insertions(+) diff --git a/configure b/configure index b177b141..ab45878d 100755 --- a/configure +++ b/configure @@ -62,6 +62,7 @@ CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}

pytest integration for the notmuch test suite

2018-03-25 Thread David Bremner
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

[PATCH 3/3] test: add example test using pytest

2018-03-25 Thread David Bremner
It might make sense to remove the non-pytest version of this test, but that requires other changes to following tests --- test/T390-python.sh | 12 1 file changed, 12 insertions(+) diff --git a/test/T390-python.sh b/test/T390-python.sh index 9f71ce3c..72036004 100755 ---