unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: Michael Albinus <michael.albinus@gmx.de>,  emacs-devel@gnu.org
Subject: Re: master bb9133f09da: * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Inhibit interaction
Date: Mon, 14 Aug 2023 10:39:26 -0400	[thread overview]
Message-ID: <jwvpm3pofmf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <18DBF0B1-8534-48C2-B5FE-4B324A93AB2A@gmail.com> ("Mattias Engdegård"'s message of "Mon, 14 Aug 2023 16:25:13 +0200")

>> FWIW, I added it because I'm seeing tests (e.g. `file-tests.el`) hang in
>> `read-event` (apparently because a (cl-letf ((symbol-function ..)) ..)
>> rebinding is not taking effect :-( ) and I figured that batch tests
>> should indeed never need interaction.
>
> I agree, but some tests persist. For example, abbrev-tests uses
> ert-simulate-keys to 'interact' with Emacs.
> Other test do morally equivalent things, and it is indubitably useful to be
> able to test interactive features non-interactively in some way.

Oh, I think I see: `inhibit-interaction` is probably tested too early,
e.g. upon entry to `read-event` (which can return without user
interaction if there's enough `unread-command-events` and friends)
instead of upon entry to the actual code that waits for user input, so
it doesn't quite do what I thought it would.


        Stefan




  reply	other threads:[~2023-08-14 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169195451549.1474.16374421496442723026@vcs2.savannah.gnu.org>
     [not found] ` <20230813192155.C53CEC295F9@vcs2.savannah.gnu.org>
2023-08-14  7:13   ` master bb9133f09da: * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Inhibit interaction Michael Albinus
2023-08-14  8:25     ` Mattias Engdegård
2023-08-14 14:00     ` Stefan Monnier
2023-08-14 14:25       ` Mattias Engdegård
2023-08-14 14:39         ` Stefan Monnier [this message]
2023-08-14 15:01           ` Michael Albinus
2023-08-14 15:05           ` Stefan Monnier
2023-08-14 19:30       ` Jens Schmidt
2023-08-14 20:19         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpm3pofmf.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=mattias.engdegard@gmail.com \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).