GNU bug report logs -
#9803
Add ERT option to skip test
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Thu, 20 Oct 2011 03:44:02 UTC
Severity: wishlist
Found in version 24.0.90
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Glenn Morris <rgm <at> 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.
This bug report was last modified 11 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.