unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ert tests and dependencies.
@ 2013-02-20 21:09 Fabian Ezequiel Gallina
  2013-02-20 21:22 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Ezequiel Gallina @ 2013-02-20 21:09 UTC (permalink / raw)
  To: Emacs-Devel devel

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.



Regards,
-- 
Fabián E. Gallina
http://www.from-the-cloud.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ert tests and dependencies.
  2013-02-20 21:09 ert tests and dependencies Fabian Ezequiel Gallina
@ 2013-02-20 21:22 ` Glenn Morris
  2013-02-20 22:37   ` Fabian Ezequiel Gallina
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-02-20 21:22 UTC (permalink / raw)
  To: Fabian Ezequiel Gallina; +Cc: Emacs-Devel devel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ert tests and dependencies.
  2013-02-20 21:22 ` Glenn Morris
@ 2013-02-20 22:37   ` Fabian Ezequiel Gallina
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Ezequiel Gallina @ 2013-02-20 22:37 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs-Devel devel

2013/2/20 Glenn Morris <rgm@gnu.org>:
> 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

That's good enough for me, thanks!

Although I agree it would be nice to have a way to skip tests.


Regards,
-- 
Fabián E. Gallina
http://www.from-the-cloud.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-20 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-20 21:09 ert tests and dependencies Fabian Ezequiel Gallina
2013-02-20 21:22 ` Glenn Morris
2013-02-20 22:37   ` Fabian Ezequiel Gallina

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