all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Some testing issues
Date: Fri, 14 Jul 2017 11:55:13 +0200	[thread overview]
Message-ID: <87pod3gx6m.fsf@rosalinde> (raw)
In-Reply-To: <CAM-tV-9Lbf1SXQ7E9gfhQsvBhCs11S4GTQjDSmvBXFLnzujVwA@mail.gmail.com> (Noam Postavsky's message of "Sat, 8 Jul 2017 18:01:12 -0400")

On Sat, 8 Jul 2017 18:01:12 -0400 Noam Postavsky <npostavs@users.sourceforge.net> wrote:

> On Sat, Jul 8, 2017 at 10:50 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
>>>    `(let* ((todo-test-home (make-temp-file "todo-test-home-" t))
>>> +          (abbreviated-home-dir nil)
>>>            (process-environment (cons (format "HOME=%s" todo-test-home)
>>>                                       process-environment))
>>
>> The only test file that sets abbreviated-home-dir is package-test.el, in
>> the macro with-package-test, which was indeed the inspiration for
>> with-todo-test.  I assume this would only effect cases like yours, and
>> hence make the test environment more robust, or are possible problems
>> that setting it to nil could raise?
>
> abbreviated-home-dir is essentially a cache used by
> abbreviate-file-name, and when the value of HOME is changed the cached
> value is wrong, hence why setting it to nil is the right thing.
> Possibly we should record the value of HOME we cached and clear it
> automatically when a new one is used so that this kind of thing is not
> needed.

In the mean time, it sounds like setting it to nil is appropriate.

>>>
>>> I think it succeeds the second time because the *ert* buffer is in a
>>> different state.
>>
>> What state is that?  In Edebug it appears to be the same as on the first
>> test run: current-buffer is todo-test-1.todo and selected-window is the
>> one showing the *ert* buffer, yet now (pos-visible-in-window-p shown) is
>> non-nil, while on the first run it is nil.  I don't see what makes the
>> difference -- certainly not the value of the variable `shown', which is
>> 226 and that position in window displaying *ert* is visible in both runs.
>
> Maybe the set-window-buffer from the other tests leaks in? For some
> reason I can't reproduce this today, every time I run with the
> set-window-buffer commented out it consistently fails. I'm sure
> yesterday I saw it succeeding after the first time.

There should be no leakage, because the state is cleared after each
individual test run (at least, that's what with-todo-test is supposed to
do).

>>> todo-test-toggle-item-header04? I added a `message' call, and it seems
>>> that in batch mode the selected window shows *scratch* whereas in
>>> interactive mode it shows *ert*. I would say the success in
>>> interactive mode is just a coincidence.
>>
>> Well, it's a reliably reproducible coincidence, which seems like a
>> contradiction in terms.
>
> I mean "coincidence" in the same way that the 5th digit of pi being 5
> is a "coincidence" (slightly less reliable than that though,
> presumably if we made `initial-scratch-message' long enough the batch
> mode behaviour would change).

Ah, ok.

Steve Berman



  reply	other threads:[~2017-07-14  9:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 21:22 Some testing issues Stephen Berman
2017-07-08  4:20 ` Noam Postavsky
2017-07-08 14:50   ` Stephen Berman
2017-07-08 22:01     ` Noam Postavsky
2017-07-14  9:55       ` Stephen Berman [this message]
2017-07-08  4:45 ` Stefan Monnier
2017-07-08 14:52   ` Stephen Berman
2017-07-10 17:33     ` Stefan Monnier
2017-07-14  9:56       ` Stephen Berman
2017-07-14 13:44         ` Stefan Monnier
2017-07-17 10:02           ` Stephen Berman
2017-07-17 18:22             ` Stefan Monnier
2017-07-08  7:18 ` martin rudalics
2017-07-08 14:51   ` Stephen Berman
2017-07-09  7:46     ` martin rudalics
2017-07-14  9:55       ` Stephen Berman

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

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

  git send-email \
    --in-reply-to=87pod3gx6m.fsf@rosalinde \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.