From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: ert tests and dependencies. Date: Wed, 20 Feb 2013 16:22:32 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1361395363 14384 80.91.229.3 (20 Feb 2013 21:22:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 21:22:43 +0000 (UTC) Cc: Emacs-Devel devel To: Fabian Ezequiel Gallina Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 22:23:06 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8H82-0001z9-CM for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 22:23:02 +0100 Original-Received: from localhost ([::1]:40050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8H7i-0000Sd-3o for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 16:22:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8H7f-0000SI-0c for emacs-devel@gnu.org; Wed, 20 Feb 2013 16:22:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8H7a-0000Zq-NE for emacs-devel@gnu.org; Wed, 20 Feb 2013 16:22:38 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8H7a-0000Zm-K5 for emacs-devel@gnu.org; Wed, 20 Feb 2013 16:22:34 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U8H7Z-0006wa-1M; Wed, 20 Feb 2013 16:22:33 -0500 X-Spook: quiche S Key Plame Hugo Chavez Ruby Ridge Putin argus X-Ran: !v62P714#B6vaGg&xWX?S/(nF'6Y:;zi>#,~uDP)ES-R.H.{UBAAP6xxMxZ"9p\rmsXFy, X-Hue: blue X-Attribution: GM In-Reply-To: (Fabian Ezequiel Gallina's message of "Wed, 20 Feb 2013 18:09:15 -0300") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157220 Archived-At: 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