]> git.notmuchmail.org Git - notmuch/blob - test/python
clean up "compare thread ids" python test
[notmuch] / test / python
1 #!/usr/bin/env bash
2 test_description="python bindings"
3 . ./test-lib.sh
4
5 add_email_corpus
6
7 test_begin_subtest "compare thread ids"
8 test_python <<EOF
9 import notmuch
10 db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
11 q_new = notmuch.Query(db, 'tag:inbox')
12 q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
13 for t in q_new.search_threads():
14     print t.get_thread_id()
15 EOF
16 notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
17 test_expect_equal_file OUTPUT EXPECTED
18 test_done