#!/usr/bin/env bash test_description="python bindings" . ./test-lib.sh add_email_corpus # This test relies on the output from the python Thread.__str__ # method being byte compatible with that from notmuch search. test_begin_subtest "compare with notmuch search" python < OUTPUT import notmuch db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) q_new = notmuch.Query(db, 'tag:inbox') for t in q_new.search_threads(): print unicode(t) EOF notmuch search tag:inbox > EXPECTED test_expect_equal_file OUTPUT EXPECTED test_done