From: David Bremner Date: Tue, 30 Dec 2014 20:29:37 +0000 (+0100) Subject: [Patch v2 2/5] test: add python tests for query.count_{messages,threads} X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ab14edf45a79dfd460b57e5075693082f0ff125;p=notmuch-archives.git [Patch v2 2/5] test: add python tests for query.count_{messages,threads} --- diff --git a/aa/188266f2211a601166e190c2672233913ef480 b/aa/188266f2211a601166e190c2672233913ef480 new file mode 100644 index 000000000..9979d4bdb --- /dev/null +++ b/aa/188266f2211a601166e190c2672233913ef480 @@ -0,0 +1,88 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 8B1E9431FD0 + for ; Tue, 30 Dec 2014 12:30:30 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id nEErvidhVu60 for ; + Tue, 30 Dec 2014 12:30:28 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2D8EA431FD5 + for ; Tue, 30 Dec 2014 12:30:27 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Y63Qw-0000zo-O5; Tue, 30 Dec 2014 16:30:26 -0400 +Received: (nullmailer pid 10593 invoked by uid 1000); Tue, 30 Dec 2014 + 20:29:44 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v2 2/5] test: add python tests for + query.count_{messages,threads} +Date: Tue, 30 Dec 2014 21:29:37 +0100 +Message-Id: <1419971380-10307-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.3 +In-Reply-To: <1419971380-10307-1-git-send-email-david@tethera.net> +References: <1419971380-10307-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Tue, 30 Dec 2014 20:30:31 -0000 + +These are more or less cargo culted from the existing python tests. In +particular they compare against the results of doing an analogous +query using the CLI. +--- + test/T390-python.sh | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/test/T390-python.sh b/test/T390-python.sh +index 3f03a2e..ddbf164 100755 +--- a/test/T390-python.sh ++++ b/test/T390-python.sh +@@ -36,4 +36,24 @@ print db.find_message_by_filename("i-dont-exist") + EOF + test_expect_equal "$(cat OUTPUT)" "None" + ++test_begin_subtest "count messages" ++test_python < EXPECTED ++test_expect_equal_file OUTPUT EXPECTED ++ ++test_begin_subtest "count threads" ++test_python < EXPECTED ++test_expect_equal_file OUTPUT EXPECTED ++ + test_done +-- +2.1.3 +