From ba87b95c0aadf0437e937f3f00395786ec4046cd Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 23 May 2015 22:28:44 +0200 Subject: [PATCH] [PATCH 1/4] test: make python tests compatible with python3 --- e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 diff --git a/e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 b/e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 new file mode 100644 index 000000000..79daeda2d --- /dev/null +++ b/e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 @@ -0,0 +1,87 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 6AF796DE10F8 + for ; Sat, 23 May 2015 13:31:19 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.28 +X-Spam-Level: +X-Spam-Status: No, score=0.28 tagged_above=-999 required=5 tests=[AWL=0.270, + T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LXUPCZkNjTKi for ; + Sat, 23 May 2015 13:31:15 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id CCB8C6DE1926 + for ; Sat, 23 May 2015 13:31:14 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YwG41-0002re-3P; Sat, 23 May 2015 20:30:33 +0000 +Received: (nullmailer pid 8761 invoked by uid 1000); Sat, 23 May 2015 + 20:29:05 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 1/4] test: make python tests compatible with python3 +Date: Sat, 23 May 2015 22:28:44 +0200 +Message-Id: <1432412927-8373-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1432412927-8373-1-git-send-email-david@tethera.net> +References: <1432412927-8373-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 23 May 2015 20:31:19 -0000 + +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 <