From: Michael Albinus <michael.albinus@gmx.de>
To: Glenn Morris <rgm@gnu.org>
Cc: 9803@debbugs.gnu.org
Subject: bug#9803: Add ERT option to skip test
Date: Thu, 04 Jul 2013 20:40:10 +0200 [thread overview]
Message-ID: <871u7eb245.fsf@gmx.de> (raw)
In-Reply-To: <rqr528fhvu.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 19 Oct 2011 23:42:45 -0400")
Glenn Morris <rgm@gnu.org> writes:
> I think it would be nice if ert had the ability to skip tests.
> Eg, a :skip argument that works the same way as :expected-result.
> This would be useful eg when a test relies on external executable that
> might not be installed on the system running the tests. You can get the
> same result by using :expected-result, but :skip might be nicer in such
> cases.
Skipping tests is already possible. Instead of writing
(ert-deftest vc-bzr-test-bug9726 ()
"Test for http://debbugs.gnu.org/9726 ."
:expected-result (if (executable-find vc-bzr-program) :passed :failed)
(should (executable-find vc-bzr-program))
...
you could do
(when (executable-find vc-bzr-program)
(ert-deftest vc-bzr-test-bug9726 ()
"Test for http://debbugs.gnu.org/9726 ."
...
The only drawback I see is that such skipped tests are not listed in the
output of an ert run.
Best regards, Michael.
next prev parent reply other threads:[~2013-07-04 18:40 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 [this message]
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
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
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=871u7eb245.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 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).