[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9803: Add ERT option to skip test
From: |
Michael Albinus |
Subject: |
bug#9803: Add ERT option to skip test |
Date: |
Thu, 04 Jul 2013 20:40:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#9803: Add ERT option to skip test,
Michael Albinus <=