1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 8B1E9431FD0
\r
6 for <notmuch@notmuchmail.org>; Tue, 30 Dec 2014 12:30:30 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id nEErvidhVu60 for <notmuch@notmuchmail.org>;
\r
16 Tue, 30 Dec 2014 12:30:28 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 2D8EA431FD5
\r
21 for <notmuch@notmuchmail.org>; Tue, 30 Dec 2014 12:30:27 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
24 id 1Y63Qw-0000zo-O5; Tue, 30 Dec 2014 16:30:26 -0400
\r
25 Received: (nullmailer pid 10593 invoked by uid 1000); Tue, 30 Dec 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [Patch v2 2/5] test: add python tests for
\r
30 query.count_{messages,threads}
\r
31 Date: Tue, 30 Dec 2014 21:29:37 +0100
\r
32 Message-Id: <1419971380-10307-3-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 2.1.3
\r
34 In-Reply-To: <1419971380-10307-1-git-send-email-david@tethera.net>
\r
35 References: <1419971380-10307-1-git-send-email-david@tethera.net>
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Tue, 30 Dec 2014 20:30:31 -0000
\r
50 These are more or less cargo culted from the existing python tests. In
\r
51 particular they compare against the results of doing an analogous
\r
52 query using the CLI.
\r
54 test/T390-python.sh | 20 ++++++++++++++++++++
\r
55 1 file changed, 20 insertions(+)
\r
57 diff --git a/test/T390-python.sh b/test/T390-python.sh
\r
58 index 3f03a2e..ddbf164 100755
\r
59 --- a/test/T390-python.sh
\r
60 +++ b/test/T390-python.sh
\r
61 @@ -36,4 +36,24 @@ print db.find_message_by_filename("i-dont-exist")
\r
63 test_expect_equal "$(cat OUTPUT)" "None"
\r
65 +test_begin_subtest "count messages"
\r
68 +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
\r
69 +q_new = notmuch.Query(db, 'tag:inbox')
\r
70 +print q_new.count_messages()
\r
72 +notmuch count --output=messages tag:inbox > EXPECTED
\r
73 +test_expect_equal_file OUTPUT EXPECTED
\r
75 +test_begin_subtest "count threads"
\r
78 +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
\r
79 +q_new = notmuch.Query(db, 'tag:inbox')
\r
80 +print q_new.count_threads()
\r
82 +notmuch count --output=threads tag:inbox > EXPECTED
\r
83 +test_expect_equal_file OUTPUT EXPECTED
\r