all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Undefining an ERT test?
@ 2020-06-11 21:52 Douglas Lewan
  2020-06-11 22:10 ` Joost Kremers
  0 siblings, 1 reply; 9+ messages in thread
From: Douglas Lewan @ 2020-06-11 21:52 UTC (permalink / raw)
  To: help-gnu-emacs

For me one flaw of ERT is that it runs tests in alphabetical order, not 
the order in which they were defined. I'd like to test initialization 
before I test more interesting function, for example.

To get around this my tests tend to begin with a 3 digit number 
(starting at 000), and I have code that will renumber them for me. (Test 
000-... runs before test 001-..., before 002-..., etc.) Unfortunately, 
ERT remembers the previous names (and the corresponding test) and when I 
want to run test 012-..., for example, with (ert "012-") ERT might pick 
up a "former" test with a matching name. This is not unsurmountable, but 
it's distracting and occasionally confusing.

So, the question is: Is there something like (fmakunbound) for ERT?

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 21:52 Undefining an ERT test? Douglas Lewan
@ 2020-06-11 22:10 ` Joost Kremers
  2020-06-11 22:27   ` Douglas Lewan
  0 siblings, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2020-06-11 22:10 UTC (permalink / raw)
  To: help-gnu-emacs


On Thu, Jun 11 2020, Douglas Lewan wrote:
> So, the question is: Is there something like (fmakunbound) for 
> ERT?

There is `ert-make-test-unbound`.

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 22:10 ` Joost Kremers
@ 2020-06-11 22:27   ` Douglas Lewan
  2020-06-11 23:01     ` Joost Kremers
  0 siblings, 1 reply; 9+ messages in thread
From: Douglas Lewan @ 2020-06-11 22:27 UTC (permalink / raw)
  To: help-gnu-emacs

On 6/11/20 6:10 PM, Joost Kremers wrote:
>
> On Thu, Jun 11 2020, Douglas Lewan wrote:
>> So, the question is: Is there something like (fmakunbound) for ERT?
>
> There is `ert-make-test-unbound`.

Thanks, that looks like just the thing.

It's not in my info file (I'm on emacs 24.5). I don't find it in my 26.3 
source tree either. Should it be?

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 22:27   ` Douglas Lewan
@ 2020-06-11 23:01     ` Joost Kremers
  2020-06-11 23:22       ` Douglas Lewan
  0 siblings, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2020-06-11 23:01 UTC (permalink / raw)
  To: help-gnu-emacs


On Fri, Jun 12 2020, Douglas Lewan wrote:
> On 6/11/20 6:10 PM, Joost Kremers wrote:
>>
>> On Thu, Jun 11 2020, Douglas Lewan wrote:
>>> So, the question is: Is there something like (fmakunbound) for 
>>> ERT?
>>
>> There is `ert-make-test-unbound`.
>
> Thanks, that looks like just the thing.
>
> It's not in my info file (I'm on emacs 24.5). I don't find it in 
> my 26.3 
> source tree either. Should it be?

Don't know about 24.5, but I'm pretty sure it should be in 26.3, 
because I remember using it when I was running 26.3.

Just to make sure, I checked out the emacs-26 branch in my local 
copy of the Emacs git repo, and it *is* there, in `ert.el`.

BTW, there's also `ert-delete-test` and `ert-delete-all-tests`, 
which are interactive functions (`ert-make-test-unbound` is not), 
so you can call them with `M-x`.

HTH

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 23:01     ` Joost Kremers
@ 2020-06-11 23:22       ` Douglas Lewan
  2020-06-11 23:37         ` Joost Kremers
  0 siblings, 1 reply; 9+ messages in thread
From: Douglas Lewan @ 2020-06-11 23:22 UTC (permalink / raw)
  To: help-gnu-emacs

On 6/11/20 7:01 PM, Joost Kremers wrote:
>
> On Fri, Jun 12 2020, Douglas Lewan wrote:
>> On 6/11/20 6:10 PM, Joost Kremers wrote:
>>>
>>> On Thu, Jun 11 2020, Douglas Lewan wrote:
>>>> So, the question is: Is there something like (fmakunbound) for ERT?
>>>
>>> There is `ert-make-test-unbound`.
>>
>> Thanks, that looks like just the thing.
>>
>> It's not in my info file (I'm on emacs 24.5). I don't find it in my 
>> 26.3 source tree either. Should it be?
>
> Don't know about 24.5, but I'm pretty sure it should be in 26.3, 
> because I remember using it when I was running 26.3.
>
> Just to make sure, I checked out the emacs-26 branch in my local copy 
> of the Emacs git repo, and it *is* there, in `ert.el`.
It looks like my copy of 26.3 was pulled (from ftp.gnu.org). I don't 
remember exactly when, but it looks like the most recent build was on 
2020 May 21. I don't know if it's possible that the development 
repository and ftp.gnu.org/emacs/emacs-26.3.tar.gz could be out of sync.
>
> BTW, there's also `ert-delete-test` and `ert-delete-all-tests`, which 
> are interactive functions (`ert-make-test-unbound` is not), so you can 
> call them with `M-x`.
>
> HTH
Just what I want. Thanks.

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 23:22       ` Douglas Lewan
@ 2020-06-11 23:37         ` Joost Kremers
  2020-06-12  4:17           ` Douglas Lewan
  0 siblings, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2020-06-11 23:37 UTC (permalink / raw)
  To: help-gnu-emacs


On Fri, Jun 12 2020, Douglas Lewan wrote:
>> Just to make sure, I checked out the emacs-26 branch in my 
>> local copy 
>> of the Emacs git repo, and it *is* there, in `ert.el`.
> It looks like my copy of 26.3 was pulled (from ftp.gnu.org). I 
> don't 
> remember exactly when, but it looks like the most recent build 
> was on 
> 2020 May 21. I don't know if it's possible that the development 
> repository and ftp.gnu.org/emacs/emacs-26.3.tar.gz could be out 
> of sync.

Something funky going on... I just downloaded emacs-26.3.tar.gz 
from the location you mention and it contains 
`ert-make-test-unbound`

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-11 23:37         ` Joost Kremers
@ 2020-06-12  4:17           ` Douglas Lewan
  2020-06-12  6:26             ` Joost Kremers
  0 siblings, 1 reply; 9+ messages in thread
From: Douglas Lewan @ 2020-06-12  4:17 UTC (permalink / raw)
  To: help-gnu-emacs

On 6/11/20 7:37 PM, Joost Kremers wrote:
>
> On Fri, Jun 12 2020, Douglas Lewan wrote:
>>> Just to make sure, I checked out the emacs-26 branch in my local 
>>> copy of the Emacs git repo, and it *is* there, in `ert.el`.
>> It looks like my copy of 26.3 was pulled (from ftp.gnu.org). I don't 
>> remember exactly when, but it looks like the most recent build was on 
>> 2020 May 21. I don't know if it's possible that the development 
>> repository and ftp.gnu.org/emacs/emacs-26.3.tar.gz could be out of sync.
>
> Something funky going on... I just downloaded emacs-26.3.tar.gz from 
> the location you mention and it contains `ert-make-test-unbound`

I suspect we may be talking at cross purposes. I'm talking about the 
documentation, which I find to be in doc/misc/ert.texi and 
info/ert.info. Even with a fresh download I find no reference to 
ert-make-test-unbond. In the source, lisp/emacs-lisp/ert.el, however, 
all the relevantare defined.

In my original post I was referring to the documentation (as mentioned 
above). I'll ask my questino again: Should the function 
ert-make-test-unbound be mentioned in the info? How about its wrapper 
commands ert-delete-test and ert-delete-all-tests?

Sorry if I wasn't clear the first time.

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-12  4:17           ` Douglas Lewan
@ 2020-06-12  6:26             ` Joost Kremers
  2020-06-12  6:51               ` Douglas Lewan
  0 siblings, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2020-06-12  6:26 UTC (permalink / raw)
  To: help-gnu-emacs


On Fri, Jun 12 2020, Douglas Lewan wrote:
> In my original post I was referring to the documentation (as 
> mentioned 
> above). I'll ask my questino again: Should the function 
> ert-make-test-unbound be mentioned in the info? How about its 
> wrapper 
> commands ert-delete-test and ert-delete-all-tests?

My apologies, I obviously misunderstood. I didn't check the 
documentation at all, I found the function with `C-h f` (back when 
I looked for the same thing myself and yesterday after I read your 
question).

You are right, `ert-delete-test` and `ert-delete-all-tests` should 
probably be in the documentation. I just checked the ERT docs that 
come with my Emacs 27 install and those two functions don't seem 
to be mentioned.

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Undefining an ERT test?
  2020-06-12  6:26             ` Joost Kremers
@ 2020-06-12  6:51               ` Douglas Lewan
  0 siblings, 0 replies; 9+ messages in thread
From: Douglas Lewan @ 2020-06-12  6:51 UTC (permalink / raw)
  To: help-gnu-emacs

On 6/12/20 2:26 AM, Joost Kremers wrote:
>
> You are right, `ert-delete-test` and `ert-delete-all-tests` should 
> probably be in the documentation. I just checked the ERT docs that 
> come with my Emacs 27 install and those two functions don't seem to be 
> mentioned.
>
Thanks. I'll submit a bug when I get up and have a cllearer head.

-- 
,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-12  6:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-11 21:52 Undefining an ERT test? Douglas Lewan
2020-06-11 22:10 ` Joost Kremers
2020-06-11 22:27   ` Douglas Lewan
2020-06-11 23:01     ` Joost Kremers
2020-06-11 23:22       ` Douglas Lewan
2020-06-11 23:37         ` Joost Kremers
2020-06-12  4:17           ` Douglas Lewan
2020-06-12  6:26             ` Joost Kremers
2020-06-12  6:51               ` Douglas Lewan

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.