From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIVjv-0000Kw-Eu for guix-patches@gnu.org; Sat, 25 Nov 2017 03:23:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIVjr-00034k-GS for guix-patches@gnu.org; Sat, 25 Nov 2017 03:23:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:48030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIVjr-00034c-CK for guix-patches@gnu.org; Sat, 25 Nov 2017 03:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIVjr-00064U-6C for guix-patches@gnu.org; Sat, 25 Nov 2017 03:23:03 -0500 Subject: [bug#29434] [PATCH 2/2] gnu: python-internetarchive: Enable tests. Resent-Message-ID: From: Oleg Pykhalov Date: Sat, 25 Nov 2017 11:21:58 +0300 Message-Id: <20171125082158.28025-2-go.wigust@gmail.com> In-Reply-To: <20171125082158.28025-1-go.wigust@gmail.com> References: <20171125082158.28025-1-go.wigust@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29434@debbugs.gnu.org * gnu/packages/web.scm (python-internetarchive): Enable tests. --- gnu/packages/web.scm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 9e6ad5b69..988a73170 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -5172,21 +5172,20 @@ command-line arguments or read from stdin.") "0sdbb2ag6vmybi8zmbjszi492a587giaaqxyy1p6gy03cb8mc512")))) (build-system python-build-system) (arguments - `(#:tests? #f ; 11 tests of 105 fail to mock "requests". - #:phases + `(#:phases (modify-phases %standard-phases (delete 'check) (add-after 'install 'check - (lambda* (#:key inputs outputs target (tests? (not target)) #:allow-other-keys) - (if tests? - (begin - (add-installed-pythonpath inputs outputs) - (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" - ":" (getenv "PATH"))) - (zero? (system* "py.test"))) - (begin - (format #t "test suite not run~%") - #t))))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" + ":" (getenv "PATH"))) + (zero? (system* "py.test" "-v" "-k" + (string-append + ;; This tests attempts to make a connection to + ;; an external web service. + "not test_get_item_with_kwargs" + " and not test_ia")))))))) (propagated-inputs `(("python-requests" ,python-requests) ("python-jsonpatch" ,python-jsonpatch-0.4) -- 2.15.0