From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#62092: 30.0.50; "case" does not work as dedenter in Python Date: Tue, 15 Aug 2023 22:43:19 +0900 Message-ID: References: Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Tue_Aug_15_22:43:17_2023-1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18214"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Lele Gaifax , 62092@debbugs.gnu.org, Dmitry Gutov To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 15 15:44:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qVuLN-0004au-EE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Aug 2023 15:44:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVuL6-0004Jp-3G; Tue, 15 Aug 2023 09:44:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVuL4-0004J9-WE for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 09:44:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVuL4-0008Kt-OX for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 09:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qVuL4-0005vC-5K for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 09:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2023 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62092 X-GNU-PR-Package: emacs Original-Received: via spool by 62092-submit@debbugs.gnu.org id=B62092.169210702522724 (code B ref 62092); Tue, 15 Aug 2023 13:44:02 +0000 Original-Received: (at 62092) by debbugs.gnu.org; 15 Aug 2023 13:43:45 +0000 Original-Received: from localhost ([127.0.0.1]:35238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVuKn-0005uS-5u for submit@debbugs.gnu.org; Tue, 15 Aug 2023 09:43:45 -0400 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:42477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVuKj-0005uB-22 for 62092@debbugs.gnu.org; Tue, 15 Aug 2023 09:43:43 -0400 Original-Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-564af1b3a9fso3563234a12.1 for <62092@debbugs.gnu.org>; Tue, 15 Aug 2023 06:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692107015; x=1692711815; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=VHwBio2VAG7FiJrjxFC0W/+qbPy5eZWKmQY5tRSvkgc=; b=KeTFy2jt1XkI2+BJtv05isMnZpQYKYQZfcB/s/KK6V2RF9amxrrybPG6ySie4xhmVt 5mw9HhqTKBWGQOdW1iTlOkt165gE9IqtrOYFxm9r208/eh6kkLqR2ab+MAGfndKcDhil BMsbEKxLB4suwEla56zcDbb2C4qWjVBt1G34jpxnR5ax18ND5NfAVt1zeRpL7BexHVS1 rS76E5Uw5GHzP3H/eSxTEP1OFDx7uWdry5C1Vp1yu0D9PjHOgaK9R4h7etGKm6xzqrB4 +aGnNICJiFdxaFgQgCaTwOUZ8erRlM5Xtnt4gtBZN7U1hXo3AQSRKPYR+OJVD5aLYQ5I x9sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692107015; x=1692711815; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VHwBio2VAG7FiJrjxFC0W/+qbPy5eZWKmQY5tRSvkgc=; b=Bf9zc1zKo3bypc+0Lvyu1kTepUuW1dpiWTereEeTBEEjGF42oiYLny8o8DDm5ln9Mp rrtvfTulxNtfuyBlCxg6SjDcXksjV8rwlJHTkzd/HMmGBovjRTTG9nW7ALlGabCA3eT6 U8vJMRDjV5l19xbTPcbwQAsjxEXUGL9KOsjNWYKEwufPTfM1NvxeWuwC8Q0FSa/Dtdkm 3sUo/2cFI4+diWq8eNaU+zyhvVQgw6XFTbx8rEYUGyIIeiBT47+WpPrWK7uwkmkKxVpz eBoHYpLdD4z+66AwNQO1NNJ/R3+cGXs6uXG8sEwGwhbHMPICuLgBTO25HcyiDczgy5eq OBTw== X-Gm-Message-State: AOJu0Yyps5YH6d4Erd5130INv1aRZQdEUqy+iKyr1AAJ3OZQrAqO3QIY AEbnWaQZ3yASMVlCcLNd5RY= X-Google-Smtp-Source: AGHT+IEASa1C0Hle9mqT8OPlJdXBSAf6Aq2ZqRcw+e1FjLPHfbE+4+ZQvfNHtKqOkabywUCxDRupGQ== X-Received: by 2002:a05:6a20:440a:b0:13a:3bd6:2530 with SMTP id ce10-20020a056a20440a00b0013a3bd62530mr2756436pzb.1.1692107014993; Tue, 15 Aug 2023 06:43:34 -0700 (PDT) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id x9-20020a656aa9000000b00563df2ba23bsm9263977pgu.50.2023.08.15.06.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 06:43:34 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267488 Archived-At: --Multipart_Tue_Aug_15_22:43:17_2023-1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=E5rd wrote: >=20 > The test python-info-dedenter-opening-block-positions-7 added as part of = this bug in 8f42db010d ends with >=20 > + (equal (list (python-tests-look-at "case 2:" -1) > + (python-tests-look-at "case 1:" -1 t)) > + (python-info-dedenter-opening-block-positions)))) >=20 > which, as you can see, isn't actually a check; the `equal` result is thro= wn away. > (Emacs master was just changed to detect this, so there is a byte-compile= r warning.) >=20 > Unfortunately, wrapping the call in `should` fails, so there is more to i= t. > Would you please take a look? Sorry, I meant to use `should'. Another mistake was forgetting to use RESTORE-POINT argument when calling `python-tests-look-at'. Attached is the patch to fix this. It also includes the indentation fix for=20 `python-info-dedenter-opening-block-positions-6'. --Multipart_Tue_Aug_15_22:43:17_2023-1 Content-Type: application/octet-stream; type=patch; name="0001-Fix-test-in-python-tests.el-added-by-bug-62092.patch" Content-Disposition: attachment; filename="0001-Fix-test-in-python-tests.el-added-by-bug-62092.patch" Content-Transfer-Encoding: 7bit >From a39bc229ae258b04f4463c4cabfbe9f1c48ee7df Mon Sep 17 00:00:00 2001 From: kobarity Date: Tue, 15 Aug 2023 22:27:45 +0900 Subject: [PATCH] Fix test in python-tests.el added by bug #62092 * test/lisp/progmodes/python-tests.el (python-info-dedenter-opening-block-positions-6): Fix indentation. (python-info-dedenter-opening-block-positions-7): Add calling `should'. Add RESTORE-POINT argument when calling `python-tests-look-at'. --- test/lisp/progmodes/python-tests.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 54e32cbf07b..9f935f2748c 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -5973,9 +5973,9 @@ python-info-dedenter-opening-block-positions-6 else " (python-tests-look-at "else\n") - (should - (equal (list (python-tests-look-at "if (" -1 t)) - (python-info-dedenter-opening-block-positions))))) + (should + (equal (list (python-tests-look-at "if (" -1 t)) + (python-info-dedenter-opening-block-positions))))) (ert-deftest python-info-dedenter-opening-block-positions-7 () "Test case blocks." @@ -5993,9 +5993,9 @@ python-info-dedenter-opening-block-positions-7 (python-tests-look-at "case 2:") (should-not (python-info-dedenter-opening-block-positions)) (python-tests-look-at "case 3:") - (equal (list (python-tests-look-at "case 2:" -1) - (python-tests-look-at "case 1:" -1 t)) - (python-info-dedenter-opening-block-positions)))) + (should (equal (list (python-tests-look-at "case 2:" -1 t) + (python-tests-look-at "case 1:" -1 t)) + (python-info-dedenter-opening-block-positions))))) (ert-deftest python-info-dedenter-opening-block-message-1 () "Test dedenters inside strings are ignored." -- 2.34.1 --Multipart_Tue_Aug_15_22:43:17_2023-1--