diff options
author | Patrick Totzke <patricktotzke@googlemail.com> | 2012-01-02 14:51:27 +0000 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-01-08 13:46:50 +0100 |
commit | ab69d6efa0e095e0bff24f77220797c58068cc08 (patch) | |
tree | 0569b1144db41b302b9c50709aec0bad0ade50bd /test | |
parent | aadf202dd57f71e93cd598a1c31bd6fb82b011f7 (diff) |
python test "compare message ids"
Introduces a second (trivial) test for the python
bindings that searches for message ids and compares
the output with that of `notmuch search`.
Diffstat (limited to 'test')
-rwxr-xr-x | test/python | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/python b/test/python index c318cc10..6018c2d0 100755 --- a/test/python +++ b/test/python @@ -15,4 +15,17 @@ for t in q_new.search_threads(): EOF notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "compare message ids" +test_python <<EOF +import notmuch +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY) +q_new = notmuch.Query(db, 'tag:inbox') +q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST) +for m in q_new.search_messages(): + print m.get_message_id() +EOF +notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED +test_expect_equal_file OUTPUT EXPECTED + test_done |