Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / e7 / 6f3ff4e3d8aa239170ea729ffc9905dcbe53f5
1 Return-Path: <bremner@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 1676F429E21\r
6         for <notmuch@notmuchmail.org>; Sun, 11 Sep 2011 16:51:52 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\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 bnrf2ItUs8dz for <notmuch@notmuchmail.org>;\r
16         Sun, 11 Sep 2011 16:51:51 -0700 (PDT)\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 555FB431FB6\r
21         for <notmuch@notmuchmail.org>; Sun, 11 Sep 2011 16:51:51 -0700 (PDT)\r
22 Received: from zancas.localnet\r
23         (fctnnbsc36w-156034073093.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
24         [156.34.73.93]) (authenticated bits=0)\r
25         by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p8BNplud015494\r
26         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
27         Sun, 11 Sep 2011 20:51:48 -0300\r
28 Received: from bremner by zancas.localnet with local (Exim 4.76)\r
29         (envelope-from <bremner@unb.ca>)\r
30         id 1R2toR-00009L-GX; Sun, 11 Sep 2011 20:51:47 -0300\r
31 From: David Bremner <david@tethera.net>\r
32 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] test: reset known_broken status in test_expect_equal and\r
34         test_expect_equal_file\r
35 In-Reply-To: <87r53mveq9.fsf@gmail.com>\r
36 References: <1309752441-10651-3-git-send-email-dmitry.kurochkin@gmail.com>\r
37         <1315782714-32287-1-git-send-email-david@tethera.net>\r
38         <87r53mveq9.fsf@gmail.com>\r
39 User-Agent: Notmuch/0.8 (http://notmuchmail.org) Emacs/23.3.1\r
40         (x86_64-pc-linux-gnu)\r
41 Date: Sun, 11 Sep 2011 20:51:47 -0300\r
42 Message-ID: <877h5ed4do.fsf@zancas.localnet>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sun, 11 Sep 2011 23:51:52 -0000\r
58 \r
59 On Mon, 12 Sep 2011 03:30:54 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
60 > Hi David.\r
61 > IMHO this is not a good idea, because:\r
62\r
63 > 1. It introduces multiple places where the flag is reset.  If new\r
64 >    test_expect_* functions are added in the future, there would be more\r
65 >    of these.  So it brings us more complex code, code duplication, more\r
66 >    chances for bugs, etc.\r
67 \r
68 Well, I'm not sure how to solve this without code duplication, since\r
69 there is no test_end_subtest. We could make one, but that seems pretty\r
70 intrusive.\r
71 \r
72 > 2. No support for tests with multiple test_expect_* calls.  I do not\r
73 >    know if it is used or works now, but the patch certainly does not\r
74 \r
75 Looking at the code for test_expect_equal_* (note that these two are\r
76 very different than test_expect_success and test_expect_failure), \r
77 several things are reset already, so I don't think it will work even\r
78 before my patch to call those routines twice.\r
79 \r
80 > 3. I thought that every test must start with a test_begin_subtest call.\r
81 >    So it is the right place to put all subtest initialization code to.\r
82 >    Is this not correct?  If it is correct, then I do not understand why\r
83 >    we should support buggy tests by hiding (some of) their bugs.  Why do\r
84 >    we need it?\r
85 \r
86 I could not find anything in the docs (or test-lib.sh) that says\r
87 test_begin_subtest must be called before test_expect_success or\r
88 test_expect_failure. Indeed if test_begin_subtest is called first, the\r
89 extra message argument to those two does not really make sense.\r
90 \r
91 What brought this to my attention is the atomicity test introduced by\r
92 amdragon, which does exactly\r
93 \r
94 test_begin_subtest\r
95 test_expect_equal_failure\r
96 test_expect_success\r
97 \r
98 d\r