[PATCH 1/4] test: make python tests compatible with python3
authorDavid Bremner <david@tethera.net>
Sat, 23 May 2015 20:28:44 +0000 (22:28 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:55 +0000 (14:48 -0700)
e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 [new file with mode: 0644]

diff --git a/e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2 b/e3/20972a111a0aa9e9c069eccaef6cecbf3d10f2
new file mode 100644 (file)
index 0000000..79daeda
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 6AF796DE10F8\r
+ for <notmuch@notmuchmail.org>; Sat, 23 May 2015 13:31:19 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.28\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.28 tagged_above=-999 required=5 tests=[AWL=0.270,\r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id LXUPCZkNjTKi for <notmuch@notmuchmail.org>;\r
+ Sat, 23 May 2015 13:31:15 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+ [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id CCB8C6DE1926\r
+ for <notmuch@notmuchmail.org>; Sat, 23 May 2015 13:31:14 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+ 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1YwG41-0002re-3P; Sat, 23 May 2015 20:30:33 +0000\r
+Received: (nullmailer pid 8761 invoked by uid 1000); Sat, 23 May 2015\r
+ 20:29:05 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/4] test: make python tests compatible with python3\r
+Date: Sat, 23 May 2015 22:28:44 +0200\r
+Message-Id: <1432412927-8373-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1432412927-8373-1-git-send-email-david@tethera.net>\r
+References: <1432412927-8373-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 23 May 2015 20:31:19 -0000\r
+\r
+Making the test suite actually run them with python3 is left for\r
+future work.\r
+---\r
+ test/T390-python.sh | 6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/T390-python.sh b/test/T390-python.sh\r
+index 3f03a2e..26d0b97 100755\r
+--- a/test/T390-python.sh\r
++++ b/test/T390-python.sh\r
+@@ -11,7 +11,7 @@ db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)\r
+ q_new = notmuch.Query(db, 'tag:inbox')\r
+ q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)\r
+ for t in q_new.search_threads():\r
+-    print t.get_thread_id()\r
++    print (t.get_thread_id())\r
+ EOF\r
+ notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+@@ -23,7 +23,7 @@ db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)\r
+ q_new = notmuch.Query(db, 'tag:inbox')\r
+ q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)\r
+ for m in q_new.search_messages():\r
+-    print m.get_message_id()\r
++    print (m.get_message_id())\r
+ EOF\r
+ notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+@@ -32,7 +32,7 @@ test_begin_subtest "get non-existent file"\r
+ test_python <<EOF\r
+ import notmuch\r
+ db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)\r
+-print db.find_message_by_filename("i-dont-exist")\r
++print (db.find_message_by_filename("i-dont-exist"))\r
+ EOF\r
+ test_expect_equal "$(cat OUTPUT)" "None"\r
\r
+-- \r
+2.1.4\r
+\r