[PATCH 1/4] test: make python tests compatible with python3
David Bremner
david at tethera.net
Sat May 23 13:28:44 PDT 2015
Making the test suite actually run them with python3 is left for
future work.
---
test/T390-python.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/T390-python.sh b/test/T390-python.sh
index 3f03a2e..26d0b97 100755
--- a/test/T390-python.sh
+++ b/test/T390-python.sh
@@ -11,7 +11,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 +23,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 +32,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"
--
2.1.4
More information about the notmuch
mailing list