From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QBIRATeuDWIbagAAgWs5BA (envelope-from ) for ; Thu, 17 Feb 2022 03:08:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mB0LOjauDWK+KQEA9RJhRA (envelope-from ) for ; Thu, 17 Feb 2022 03:08:54 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A1ABEB2D7 for ; Thu, 17 Feb 2022 03:08:54 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DF7DA5F70D; Thu, 17 Feb 2022 02:08:47 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 3F0BC5F5E3 for ; Thu, 17 Feb 2022 02:08:45 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 8D3C05FBD2; Wed, 16 Feb 2022 21:08:44 -0500 (EST) Received: (nullmailer pid 181061 invoked by uid 1000); Thu, 17 Feb 2022 02:08:39 -0000 From: David Bremner To: Floris Bruynooghe , David Bremner , notmuch@notmuchmail.org Subject: [PATCH v2 1/2] test: known broken test for list(db.config) in python-cffi bindings Date: Wed, 16 Feb 2022 22:08:34 -0400 Message-Id: <20220217020835.180940-2-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217020835.180940-1-david@tethera.net> References: <8735kipm9j.fsf@powell.devork.be> <20220217020835.180940-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 6HYT73UJ7Z3NBWVTQW6S542CGIOWNBVI X-Message-ID-Hash: 6HYT73UJ7Z3NBWVTQW6S542CGIOWNBVI X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645063734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=sgSlRpD2k6zZx96WqaXsfFFdyeU639toTL7XKtD89bE=; b=aynSuyhXepVogQBPez46oIL83L/Nqd1LUHATUGUBnEYTaxe8gzJ4xCu7j1GYTbRdQnLX/J 6h1V3WLhvEWqebKI5rcHDDLxOwZT0Cmqqrz7ACPRXrta72OzDI0QJk0mJiMl3PjG1qfIDa 8iA/o9Ijrmk4SyaydcPGf9zuu/wMq2iwOBeVBQ79ToH42OVq2PXn/OuDOuXu+NIVCv5VCP NE+SW7iLIuNUYJrJOfC/wvQVoxBhXJZhV8FQ1T76HO+gFg7kg0QCjqJQLxWM/vtLfMC1xd aDEZ74w3ciDqrRUEI+6oeYmJOesw6jyhoWDbhlYksktsTr/Syw/c60hV6gWt2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645063734; a=rsa-sha256; cv=none; b=hFikY/Vn0FGrN8vkOfSo/Mq+x46mItCbCFgbhQH8oKXTXtPL06e/4VJavsRsXgdbLXnNOJ +6W/t0u0RKo8XvJ6CaM3f2y+G0SwIUsUb+1IjdWN1x5zV3DINuwlghsP48eHkRc0Gv8M+t pYb6Dw3h5yk6QzuokJNnafRL2y9szoYFRGAgT8GlC+Mjh+HuekqAL5C8sAIQEtLIA1vl/q fYn6kMm+it6qq83Joj8F9TKfCMBfdXnNRhkD61UP6fMWlDBs+IHVdf1JrtEENeHZTZgfvb QcbuE21TCyvjmrriZU45skG1sWtSSeOHJdKLk/dD0ZwDDgdIio0ReEbqrOFh8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: A1ABEB2D7 X-Spam-Score: -1.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: t6m13ri4ziS8 As of notmuch 0.34.2 [1], the python-cffi bindings make available the configuration from both a config file and the database when accessing Database.config like a dictionary. It is therefore confusing that the iterator operations only work on the configuration information stored in the database. [1]: d7f95724132bf658fd151630185899737e2ed829 --- test/T055-path-config.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 1df240dd..71823039 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -293,6 +293,27 @@ user.primary_email=test_suite@notmuchmail.org EOF test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Config list from python ($config)" + test_subtest_known_broken + test_python < OUTPUT +from notmuch2 import Database +db=Database(config=Database.CONFIG.SEARCH) +for key in list(db.config): + print(key) +EOF + cat < EXPECTED +database.autocommit +database.backup_dir +database.hook_dir +database.mail_root +database.path +maildir.synchronize_flags +new.tags +user.name +user.other_email +user.primary_email +EOF + test_expect_equal_file EXPECTED OUTPUT case $config in XDG*) test_begin_subtest "Set shadowed config value in database ($config)" -- 2.34.1