gnu: python-internetarchive: Enable tests.

* gnu/packages/web.scm (python-internetarchive): Enable tests.
This commit is contained in:
Oleg Pykhalov 2017-11-25 11:12:08 +03:00
parent 25fa22a99b
commit 2cdf78df2d
No known key found for this signature in database
GPG Key ID: 7246E11C69B79569
1 changed files with 11 additions and 12 deletions

View File

@ -5172,21 +5172,20 @@ command-line arguments or read from stdin.")
"0sdbb2ag6vmybi8zmbjszi492a587giaaqxyy1p6gy03cb8mc512")))) "0sdbb2ag6vmybi8zmbjszi492a587giaaqxyy1p6gy03cb8mc512"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:tests? #f ; 11 tests of 105 fail to mock "requests". `(#:phases
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'check) (delete 'check)
(add-after 'install 'check (add-after 'install 'check
(lambda* (#:key inputs outputs target (tests? (not target)) #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(if tests? (add-installed-pythonpath inputs outputs)
(begin (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
(add-installed-pythonpath inputs outputs) ":" (getenv "PATH")))
(setenv "PATH" (string-append (assoc-ref outputs "out") "/bin" (zero? (system* "py.test" "-v" "-k"
":" (getenv "PATH"))) (string-append
(zero? (system* "py.test"))) ;; These tests attempt to make a connection to
(begin ;; an external web service.
(format #t "test suite not run~%") "not test_get_item_with_kwargs"
#t))))))) " and not test_ia"))))))))
(propagated-inputs (propagated-inputs
`(("python-requests" ,python-requests) `(("python-requests" ,python-requests)
("python-jsonpatch" ,python-jsonpatch-0.4) ("python-jsonpatch" ,python-jsonpatch-0.4)