unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Patrick Totzke <patricktotzke@googlemail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] clean up "compare thread ids" python test
Date: Mon,  2 Jan 2012 14:51:26 +0000	[thread overview]
Message-ID: <1325515887-15201-1-git-send-email-patricktotzke@gmail.com> (raw)
In-Reply-To: <20120102144722.18163.37346@brick.lan>

This makes the test script open the database in READ_ONLY mode
and use the libraries own sorting methods instead of "sort".
---
 test/python |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/python b/test/python
index c3aa726..c318cc1 100755
--- a/test/python
+++ b/test/python
@@ -7,11 +7,12 @@ add_email_corpus
 test_begin_subtest "compare thread ids"
 test_python <<EOF
 import notmuch
-db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
+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()
 EOF
-notmuch search --output=threads tag:inbox | sed s/^thread:// | sort > EXPECTED
-test_expect_equal_file <(sort OUTPUT) EXPECTED
+notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
 test_done
-- 
1.7.5.4

  reply	other threads:[~2012-01-02 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  9:46 [PATCH 1/2] test: add a function to run Python tests Thomas Jost
2011-12-07  9:46 ` [PATCH 2/2] test: use python2 instead of python if available Thomas Jost
2011-12-11 14:48 ` [PATCH 1/2] test: add a function to run Python tests David Bremner
2011-12-11 14:58 ` Dmitry Kurochkin
2011-12-13 17:21   ` Thomas Jost
2012-01-02 14:47     ` Patrick Totzke
2012-01-02 14:51       ` Patrick Totzke [this message]
2012-01-02 14:51         ` [PATCH 2/2] python test "compare message ids" Patrick Totzke
2012-01-08 12:52           ` Sebastian Spaeth
2012-01-08 12:55           ` notmuch git's disk is full! ERROR pushing Sebastian Spaeth
2012-01-09  5:55             ` Carl Worth
2012-01-08 12:45         ` [PATCH 1/2] clean up "compare thread ids" python test Sebastian Spaeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325515887-15201-1-git-send-email-patricktotzke@gmail.com \
    --to=patricktotzke@googlemail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).