]> git.notmuchmail.org Git - notmuch/blob - test/python
0b56db30610af9327e9c3c8b1e99591ab8544e56
[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_subtest_known_broken
9 test_python <<EOF
10 import notmuch
11 db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
12 q_new = notmuch.Query(db, 'tag:inbox')
13 for t in q_new.search_threads():
14     print t.get_thread_id()
15 EOF
16 notmuch search --output=threads tag:inbox | sed s/^thread:// | sort > EXPECTED
17 test_expect_equal_file <(sort OUTPUT) EXPECTED
18 test_done