From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 81D346DE0183 for ; Thu, 7 Dec 2017 03:48:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[AWL=0.030, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CPxTHTs7u7Jh for ; Thu, 7 Dec 2017 03:48:58 -0800 (PST) Received: from mout.web.de (mout.web.de [212.227.15.14]) by arlo.cworth.org (Postfix) with ESMTPS id 694F26DE009B for ; Thu, 7 Dec 2017 03:48:57 -0800 (PST) Received: from localhost ([78.53.227.28]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MAMY6-1eCQCF25H8-00BaUs; Thu, 07 Dec 2017 12:43:49 +0100 From: l-m-h@web.de To: notmuch@notmuchmail.org Cc: Lucas Hoffmann Subject: [PATCH 6/6] test: Add test to unset config items with the python bindings Date: Thu, 7 Dec 2017 12:40:51 +0100 Message-Id: <6403b9925fcfb07cd1d6a65ba2a19b0073d310ac.1512646265.git.l-m-h@web.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: In-Reply-To: References: <8737am9w18.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.15.1" X-Provags-ID: V03:K0:7kDoK5dKBjpRlh4RTD/EEh6PfUAnkGcLahcPgBPpH6d6CUfWg3F TSorMfEe9cj3Ys9lez0PSNcu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Thu, 07 Dec 2017 11:31:51 -0800 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 07 Dec 2017 11:48:58 -0000 From: Lucas Hoffmann This is a multi-part message in MIME format. --------------2.15.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- test/T390-python.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) --------------2.15.1 Content-Type: text/x-patch; name="0006-test-Add-test-to-unset-config-items-with-the-python-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0006-test-Add-test-to-unset-config-items-with-the-python-.patch" diff --git a/test/T390-python.sh b/test/T390-python.sh index c6f395e4..312d61e8 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -142,4 +142,17 @@ cat <<'EOF' >EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "set_config with no value will unset config entries" +test_python <<'EOF' +import notmuch +db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) +db.set_config('testkey1', '') +db.set_config('testkey2', '') +db.set_config("zzzafter", '') +db.set_config("aaabefore", '') +v = db.get_configs() +print(list(v) == []) +EOF +test_expect_equal "$(cat OUTPUT)" "True" + test_done --------------2.15.1--