aboutsummaryrefslogtreecommitdiff
path: root/test/T390-python.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-12-13 08:39:11 -0400
committerDavid Bremner <david@tethera.net>2015-12-13 08:39:11 -0400
commite3cd357fdddd2d8d29e8eea0b40a1043c46f1791 (patch)
treeb0e4f0549fc1216439e4593b73206c7923995ad4 /test/T390-python.sh
parentad5b7434978ed98b1eb832b77684869f5d02594a (diff)
parent1432a4f946e0f236179b53ac71d03764da725f33 (diff)
Merge tag 'debian/0.21-3' into jessie-backports
uploaded to unstable
Diffstat (limited to 'test/T390-python.sh')
-rwxr-xr-xtest/T390-python.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/T390-python.sh b/test/T390-python.sh
index 3f03a2e3..4726bc36 100755
--- a/test/T390-python.sh
+++ b/test/T390-python.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
test_description="python bindings"
-. ./test-lib.sh
+. ./test-lib.sh || exit 1
+
+test_require_external_prereq ${NOTMUCH_PYTHON}
add_email_corpus
@@ -11,7 +13,7 @@ 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 t in q_new.search_threads():
- print t.get_thread_id()
+ print (t.get_thread_id())
EOF
notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
test_expect_equal_file OUTPUT EXPECTED
@@ -23,7 +25,7 @@ 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()
+ 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
@@ -32,7 +34,7 @@ test_begin_subtest "get non-existent file"
test_python <<EOF
import notmuch
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
test_expect_equal "$(cat OUTPUT)" "None"