[PATCH 1/2] clean up "compare thread ids" python test
authorPatrick Totzke <patricktotzke@googlemail.com>
Mon, 2 Jan 2012 14:51:26 +0000 (14:51 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:29 +0000 (09:41 -0800)
20/62c4d7af488b4d52a6d1a83c486737ff9fbd3a [new file with mode: 0644]

diff --git a/20/62c4d7af488b4d52a6d1a83c486737ff9fbd3a b/20/62c4d7af488b4d52a6d1a83c486737ff9fbd3a
new file mode 100644 (file)
index 0000000..0cc93ee
--- /dev/null
@@ -0,0 +1,89 @@
+Return-Path: <patricktotzke@googlemail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 77CA0429E21\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Jan 2012 06:51:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DAp3A-zls9MJ for <notmuch@notmuchmail.org>;\r
+       Mon,  2 Jan 2012 06:51:44 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 04140431FD0   for <notmuch@notmuchmail.org>; Mon,  2 Jan 2012 06:51:43 -0800\r
+ (PST)\r
+Received: by wgbds13 with SMTP id ds13so22064015wgb.2\r
+       for <notmuch@notmuchmail.org>; Mon, 02 Jan 2012 06:51:42 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=googlemail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=UwvN2C0kcy+yUeoDK8d60+VcmzNXm4cp0h/xXnJ6yW8=;\r
+       b=evyx8Kp5gcl6QCMH+wCLMRKG16maCLD1JAuZSIG4EJ9rG2/l1EM2uOiTR0BkGOoGq8\r
+       xjtIzQ5/wF0/G/K4/kvtG3/Jt1gZAPDkzuqUcb2mqpDvTmxuPP9h6gVDVyNhf5Pdir2t\r
+       63ydWutZTRd26n8WiD7qHDHH4o1BZbrh+/5wQ=\r
+Received: by 10.227.206.209 with SMTP id fv17mr1031949wbb.19.1325515902518;\r
+       Mon, 02 Jan 2012 06:51:42 -0800 (PST)\r
+Received: from localhost (cpc1-sgyl2-0-0-cust548.18-2.cable.virginmedia.com.\r
+       [82.41.10.37])\r
+       by mx.google.com with ESMTPS id ei9sm118532513wid.0.2012.01.02.06.51.40\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 02 Jan 2012 06:51:41 -0800 (PST)\r
+From: Patrick Totzke <patricktotzke@googlemail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] clean up "compare thread ids" python test\r
+Date: Mon,  2 Jan 2012 14:51:26 +0000\r
+Message-Id: <1325515887-15201-1-git-send-email-patricktotzke@gmail.com>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <20120102144722.18163.37346@brick.lan>\r
+References: <20120102144722.18163.37346@brick.lan>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Mon, 02 Jan 2012 14:51:46 -0000\r
+\r
+This makes the test script open the database in READ_ONLY mode\r
+and use the libraries own sorting methods instead of "sort".\r
+---\r
+ test/python |    7 ++++---\r
+ 1 files changed, 4 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/python b/test/python\r
+index c3aa726..c318cc1 100755\r
+--- a/test/python\r
++++ b/test/python\r
+@@ -7,11 +7,12 @@ add_email_corpus\r
+ test_begin_subtest "compare thread ids"\r
+ test_python <<EOF\r
+ import notmuch\r
+-db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)\r
++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
+ EOF\r
+-notmuch search --output=threads tag:inbox | sed s/^thread:// | sort > EXPECTED\r
+-test_expect_equal_file <(sort OUTPUT) EXPECTED\r
++notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED\r
++test_expect_equal_file OUTPUT EXPECTED\r
+ test_done\r
+-- \r
+1.7.5.4\r
+\r