mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-26 04:45:20 +01:00
test: make python tests compatible with python3
Making the test suite actually run them with python3 is left for future work.
This commit is contained in:
parent
9f57b7e8c5
commit
ee1f573204
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
|
||||||
q_new = notmuch.Query(db, 'tag:inbox')
|
q_new = notmuch.Query(db, 'tag:inbox')
|
||||||
q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
|
q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
|
||||||
for t in q_new.search_threads():
|
for t in q_new.search_threads():
|
||||||
print t.get_thread_id()
|
print (t.get_thread_id())
|
||||||
EOF
|
EOF
|
||||||
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
|
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
|
||||||
test_expect_equal_file OUTPUT EXPECTED
|
test_expect_equal_file OUTPUT EXPECTED
|
||||||
|
@ -23,7 +23,7 @@ db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
|
||||||
q_new = notmuch.Query(db, 'tag:inbox')
|
q_new = notmuch.Query(db, 'tag:inbox')
|
||||||
q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
|
q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
|
||||||
for m in q_new.search_messages():
|
for m in q_new.search_messages():
|
||||||
print m.get_message_id()
|
print (m.get_message_id())
|
||||||
EOF
|
EOF
|
||||||
notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
|
notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED
|
||||||
test_expect_equal_file OUTPUT EXPECTED
|
test_expect_equal_file OUTPUT EXPECTED
|
||||||
|
@ -32,7 +32,7 @@ test_begin_subtest "get non-existent file"
|
||||||
test_python <<EOF
|
test_python <<EOF
|
||||||
import notmuch
|
import notmuch
|
||||||
db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
|
db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
|
||||||
print db.find_message_by_filename("i-dont-exist")
|
print (db.find_message_by_filename("i-dont-exist"))
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal "$(cat OUTPUT)" "None"
|
test_expect_equal "$(cat OUTPUT)" "None"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue