gnu: python-pycurl: Enable tests.
* gnu/packages/python-web.scm (python-pycurl): Enable most of the tests. [build-system]: Swap to pyproject-build-system. [arguments] <#:tests?>: Enable them. <#:test-arguments>: Disable some failing and hanging tests. [native-inputs]: Add python-flaky, python-pytest, and python-pytest-xdist. Change-Id: Ie222aa1111720f2e39b950b79d9e707401be7e8fmaster
parent
2187ac84d0
commit
a862a99bb3
|
@ -61,6 +61,7 @@
|
||||||
;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
|
;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
|
||||||
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
|
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
|
||||||
;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
|
;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
|
||||||
|
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1917,21 +1918,44 @@ Amazon S3 compatible object storage server.")
|
||||||
(uri (pypi-uri "pycurl" version))
|
(uri (pypi-uri "pycurl" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
|
(base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
;; The tests attempt to access external web servers, so we cannot run
|
'(#:test-flags
|
||||||
;; them. Furthermore, they are skipped altogether when using Python 2.
|
(list "-n" "auto"
|
||||||
'(#:tests? #f
|
"-k" (string-append
|
||||||
|
;; Disable hanginging tests
|
||||||
|
"not test_multi_socket_select"
|
||||||
|
;; E assert None is not None
|
||||||
|
;; E+ where None =
|
||||||
|
;; <tests.multi_callback_test.MultiCallbackTest
|
||||||
|
;; testMethod=test_easy_pause_unpause>.socket_result
|
||||||
|
" and not test_easy_pause_unpause"
|
||||||
|
" and not test_multi_socket_action"
|
||||||
|
;; E pycurl.error: (1, '')
|
||||||
|
" and not test_http_version_3"
|
||||||
|
;; OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot
|
||||||
|
;; open shared object file: No such file or directory
|
||||||
|
" and not test_libcurl_ssl_gnutls"
|
||||||
|
;; OSError: tests/fake-curl/libcurl/with_nss.so: cannot
|
||||||
|
;; open shared object file: No such file or directory
|
||||||
|
" and not test_libcurl_ssl_nss"
|
||||||
|
;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot
|
||||||
|
;; open shared object file: No such file or directory
|
||||||
|
" and not test_libcurl_ssl_openssl"))
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
(add-before 'build 'configure-tls-backend
|
(add-before 'build 'configure-tls-backend
|
||||||
(lambda _
|
(lambda _
|
||||||
;; XXX: PycURL fails to automatically determine which TLS
|
;; XXX: PycURL fails to automatically determine which
|
||||||
;; backend to use when cURL is built with --disable-static.
|
;; TLS backend to use when cURL is built with
|
||||||
;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
|
;; --disable-static. See setup.py and
|
||||||
(setenv "PYCURL_SSL_LIBRARY" "gnutls")
|
;; <https://github.com/pycurl/pycurl/pull/147>.
|
||||||
#t)))))
|
(setenv "PYCURL_SSL_LIBRARY" "gnutls"))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-nose python-bottle))
|
(list python-bottle
|
||||||
|
python-flaky
|
||||||
|
python-nose
|
||||||
|
python-pytest
|
||||||
|
python-pytest-xdist))
|
||||||
(inputs
|
(inputs
|
||||||
(list curl gnutls))
|
(list curl gnutls))
|
||||||
(home-page "http://pycurl.io/")
|
(home-page "http://pycurl.io/")
|
||||||
|
|
Reference in New Issue