all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Glenn Morris <rgm@gnu.org>
Cc: 9803@debbugs.gnu.org
Subject: bug#9803: [PATCH] Add ERT option to skip test
Date: Sat, 19 Oct 2013 08:44:14 +0200	[thread overview]
Message-ID: <87li1p220x.fsf@gmx.de> (raw)
In-Reply-To: <sw1u3ihy2y.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 18 Oct 2013 21:02:45 -0400")

Glenn Morris <rgm@gnu.org> writes:

> Thank you, looks nice.
> Your method is not quite how I imagined it working, but maybe your way is
> better, I haven't thought about it much... With your approach, it seems
> like I have to specify the skip condition twice? Eg I have to write:
>
> (ert-deftest foo-test ()
>   "Test for foo."
>   :expected-result (if (executable-find "foo") :passed :skipped)
>   (skip-if (not (executable-find "foo")))
>   t ; in a real use case, some test using "foo" here
> )
>
> rather than:
>
> (ert-deftest foo-test ()
>   "Test for foo."
>   :skip (not (executable-find "foo"))
>   t)

No. The idea is that skip-if works whatever you have defined in
:expected-result. It simply ignores :expected-result, when it finds a
non-nil form.

> Also, ert-run-tests-batch-and-exit seems to need updating:
>
>   Running 1 tests (2013-10-18 17:49:11-0700)
>     skipped  1/1  foo-test
>
>   Ran 1 tests, 0 results as expected (2013-10-18 17:49:11-0700)
>
> I don't think "0 results as expected" is appropriate.

Will check. I've tested the interactive call so far.

Best regards, Michael.





  parent reply	other threads:[~2013-10-19  6:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  3:42 bug#9803: Add ERT option to skip test Glenn Morris
2013-07-04 18:40 ` Michael Albinus
2013-10-18 13:37 ` bug#9803: [PATCH] " Michael Albinus
2013-10-19  1:02   ` Glenn Morris
2013-10-19  2:12     ` Stefan Monnier
2013-10-19  6:44       ` Michael Albinus
2013-10-19  6:44     ` Michael Albinus [this message]
2013-10-20  2:02       ` Glenn Morris
2013-10-20 14:09     ` Michael Albinus
2013-10-21 15:08       ` Michael Albinus
2013-10-21 16:53         ` Stefan Monnier
2013-10-21 17:02           ` Michael Albinus
2013-10-21 19:23             ` Stefan Monnier
2013-10-22  8:23               ` Michael Albinus
2013-10-23 12:21                 ` Michael Albinus
2013-10-24  7:46                   ` Michael Albinus
2013-10-24  8:00                     ` Glenn Morris

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=87li1p220x.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=9803@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /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.