emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ert tests and dependencies.


From: Glenn Morris
Subject: Re: ert tests and dependencies.
Date: Wed, 20 Feb 2013 16:22:32 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Fabian Ezequiel Gallina wrote:

> I'm planning to add tests for the python.el shell integration, but for
> these to run successfully a python executable must exist in the
> system.
>
> So the question is, what's the preferred way to define these kind of
> tests that depend on other executables than Emacs?
>
> I'm thinking on something like this:
>
> (ert-deftest python-shell-test ()
>   (if (not (executable-find "python"))
>       (message "skipping python-shell-test...")
>     (should ...))
>
> But perhaps this has been discussed or there's a standard way already.

For vc-bzr, I used:

(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))
  ...)

A proper way to skip tests would be nicer.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9803



reply via email to

[Prev in Thread] Current Thread [Next in Thread]