mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-25 19:04:53 +01:00
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`.
This commit is contained in:
parent
aadf202dd5
commit
ab69d6efa0
1 changed files with 13 additions and 0 deletions
13
test/python
13
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
|
||||
|
|
Loading…
Reference in a new issue