unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: 29434@debbugs.gnu.org
Subject: [bug#29434] [PATCH 2/2] gnu: python-internetarchive: Enable tests.
Date: Sat, 25 Nov 2017 11:21:58 +0300	[thread overview]
Message-ID: <20171125082158.28025-2-go.wigust@gmail.com> (raw)
In-Reply-To: <20171125082158.28025-1-go.wigust@gmail.com>

* 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

  reply	other threads:[~2017-11-25  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-25  8:17 [bug#29434] [PATCH 0/2] gnu: python-internetarchive: Update to 1.7.4 and enable tests Oleg Pykhalov
2017-11-25  8:21 ` [bug#29434] [PATCH 1/2] gnu: python-internetarchive: Update to 1.7.4 Oleg Pykhalov
2017-11-25  8:21   ` Oleg Pykhalov [this message]
2017-11-25  8:30     ` [bug#29434] [PATCH 2/2] gnu: python-internetarchive: Enable tests Oleg Pykhalov
2017-11-25 16:30       ` Leo Famulari
2017-11-25 16:29   ` [bug#29434] [PATCH 1/2] gnu: python-internetarchive: Update to 1.7.4 Leo Famulari
2017-11-28 17:26     ` Oleg Pykhalov
2017-11-28 17:28       ` bug#29434: " Oleg Pykhalov

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171125082158.28025-2-go.wigust@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=29434@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.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).