From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#47320: Improve failure reporting in test/lisp/electrict-tests.el Date: Wed, 24 Mar 2021 14:02:58 +0000 Message-ID: References: <87v99i5k0f.fsf@gmx.de> <877dlx3nb8.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47320@debbugs.gnu.org, Michael Albinus To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 24 15:04:10 2021 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 1lP47G-0009jw-Bq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Mar 2021 15:04:10 +0100 Original-Received: from localhost ([::1]:37972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP47F-0007oz-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Mar 2021 10:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP478-0007oO-Lx for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 10:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP478-0008Vj-F7 for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 10:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lP478-0006gX-B5 for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Mar 2021 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47320 X-GNU-PR-Package: emacs Original-Received: via spool by 47320-submit@debbugs.gnu.org id=B47320.161659459725637 (code B ref 47320); Wed, 24 Mar 2021 14:04:02 +0000 Original-Received: (at 47320) by debbugs.gnu.org; 24 Mar 2021 14:03:17 +0000 Original-Received: from localhost ([127.0.0.1]:35736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP46P-0006fR-CN for submit@debbugs.gnu.org; Wed, 24 Mar 2021 10:03:17 -0400 Original-Received: from mail-io1-f45.google.com ([209.85.166.45]:43571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP46N-0006fE-Ih for 47320@debbugs.gnu.org; Wed, 24 Mar 2021 10:03:16 -0400 Original-Received: by mail-io1-f45.google.com with SMTP id z136so21584808iof.10 for <47320@debbugs.gnu.org>; Wed, 24 Mar 2021 07:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=pSUrBggmKHaoGUv/B334cJRuzA3hc//2E+js4F2TI98=; b=ng973/7J3nbqA+oXFSlYyXFnWUL3kj6gjg9z9XsWDNFWPoh6dG9weWrUt5Wb96uKh0 au5SiZY5WCROIOPAZEpWzLRY5kNzhUIcZDl72G8mUTRDWtgqUq3I/BCMOoRch7V8RQUE uK08fkovcf5es/5YXeTBwoJY5QHsbpDaPokN+b/0zrJT0WlT+SuA1wNr0iQRuikrBiNO QCiryR8U0caCf43c9r6aphsm1FFTRX1MKlO2ml6aOcnOyb1HM3auHMc0eA0r+/Ou4u01 6KYrrwUvjQ6/trwgjnPAx/0jo13iJrQNngs6kqsKDrDVQa3FOritdpSYmmYJ03sSonm8 1Q7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=pSUrBggmKHaoGUv/B334cJRuzA3hc//2E+js4F2TI98=; b=E1mK4b8VqRMWVMRPx/Tmvz75mHJ9nmV5SmJP8W1br91CYTF+gpzv/bjmSetLRa+T9r iPqn7CdWCmBiHN0h1DCzay4KaXX1m4qGYJdPj5zKxDE2JX0D3fM/5pxmKAmJrLC0VyEz PjlWZMwfpFc36pbR/3QUr+h0Pt5PtG51K5v3BVBP9qhaT/Bvq0ORqYi8FgOTzvoN6owH WEqXLvx6HSSxzpY9jj8VIMzCDk7k4Ti/3Z/Z2VO2i8/pMWxd4LUxrLISiC9PY2svB2Pm WTsjxYxx1wBKE7FpKCR3TeZibJO1I35XVeFfb/ApkfYSYcSvPz+D/b1dAET6go0RqYzH F6ew== X-Gm-Message-State: AOAM5307biCZ6P4yyFKZlxxVPVH0L8c7w7bv7FO4PM72xBbUm239+4oQ aC5pT8uKnWbCY1YO72ftDQTKZIqOqIM4Uj72nm4= X-Google-Smtp-Source: ABdhPJy+1YFcEPHaEF1d6xLpXlfwflSJW7DWzq+/51/0UkSRBF8tHV7IA4Vdm92dQRfNpk+HFFkUU24SuI7b0CrOtz4= X-Received: by 2002:a5e:8c16:: with SMTP id n22mr2595750ioj.156.1616594589893; Wed, 24 Mar 2021 07:03:09 -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" Xref: news.gmane.io gmane.emacs.bugs:202946 Archived-At: Hello Alan, On Wed, Mar 24, 2021 at 1:46 PM Alan Mackenzie wrote: > Thanks for the positive reaction! Speak nothing of it! > I'm having some difficulty getting my head around the "explanation" > functionality of ert, which leans me towards my initial plan. > > Here's the patch (actually written quite a long time ago) I would like to > merge into electric-tests.el: As far as I understand, this just stores the big explanation string in a variable, and uses it both for putting into the `ert-deftest` 's docstrin= g as well as for logging with message(), right? If so, it's fine to add. Maybe you could leverage `ert-fail` instead of checking the test's main assertion twice, once in should, and once when deciding whether to log. I'd say, just check it once and put both logging and `ert-fail` inside the = if. Jo=C3=A3o