From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabian Ezequiel Gallina Newsgroups: gmane.emacs.devel Subject: Re: ert tests and dependencies. Date: Wed, 20 Feb 2013 19:37:27 -0300 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361400207 27521 80.91.229.3 (20 Feb 2013 22:43:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 22:43:27 +0000 (UTC) Cc: Emacs-Devel devel To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 23:43:50 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 1U8IOC-0004e6-UQ for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 23:43:49 +0100 Original-Received: from localhost ([::1]:50766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8INs-0000nS-Pz for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 17:43:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8INh-0000mt-5n for emacs-devel@gnu.org; Wed, 20 Feb 2013 17:43:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8INf-00006g-1W for emacs-devel@gnu.org; Wed, 20 Feb 2013 17:43:17 -0500 Original-Received: from mail-ie0-x236.google.com ([2607:f8b0:4001:c03::236]:58247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8INd-00005n-63; Wed, 20 Feb 2013 17:43:13 -0500 Original-Received: by mail-ie0-f182.google.com with SMTP id k14so10613429iea.13 for ; Wed, 20 Feb 2013 14:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=FDX/KAaUyl+bzKmmjNk4hxOOq1GFVCjkmqEkWGLj71k=; b=LeI7SZJYj2IQ7nMkLeLCYkC/CueDpCbSQPk6pLWZ5+rqZE0qILdVR6MP5oO/q2gbiQ w/hhl/wMZq+m1B/CEIAX72e0phNLm7NqjyoawVrc9P6RHVvt+na8WyDfc/ery/N50Ruj BAYhA8LxI64E5Q4XNH0dst3wa9hpO6Zc/dkuRSyb2DodXPsrldTSCMmWT+20mByZ3q4J SZJ/ctKAcjMbt+ShrKfG6Y9Io2Lckqu++f6PvpH4eHLm7BSF090IRUfWz98AczAgA2d0 6fmS1YB1iBk46gWZHB+Y6c5wsFoPTUClN7ZEdQrzZkrAZ4QSUnFaxN72UkK4UrLl+Sta WkAw== X-Received: by 10.42.42.69 with SMTP id s5mr10095821ice.2.1361399847526; Wed, 20 Feb 2013 14:37:27 -0800 (PST) Original-Received: by 10.64.170.165 with HTTP; Wed, 20 Feb 2013 14:37:27 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::236 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:157223 Archived-At: 2013/2/20 Glenn Morris : > 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=3D9803 That's good enough for me, thanks! Although I agree it would be nice to have a way to skip tests. Regards, --=20 Fabi=E1n E. Gallina http://www.from-the-cloud.com