all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Fabian Ezequiel Gallina <galli.87@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: ert tests and dependencies.
Date: Wed, 20 Feb 2013 16:22:32 -0500	[thread overview]
Message-ID: <hzmwuyhe93.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CABq4mQtY+7VSfzwNtEimqs_9ddoSVYMW2+BPQnr23DDE6Ro0-Q@mail.gmail.com> (Fabian Ezequiel Gallina's message of "Wed, 20 Feb 2013 18:09:15 -0300")

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	other threads:[~2013-02-20 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 21:09 ert tests and dependencies Fabian Ezequiel Gallina
2013-02-20 21:22 ` Glenn Morris [this message]
2013-02-20 22:37   ` Fabian Ezequiel Gallina

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=hzmwuyhe93.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=galli.87@gmail.com \
    /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.