gnu: python-httpx: Honor #:tests? flag.

* gnu/packages/python-web.scm (python-httpx)[arguments]: Adjust custom
'check phase to honor the #:tests? flag.
This commit is contained in:
Efraim Flashner 2021-11-02 23:00:22 +02:00
parent f46ae49b13
commit 1747bb4825
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -5283,18 +5283,19 @@ (define-public python-httpx
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest" "-vv" "-k"
;; These tests try to open an outgoing connection.
(string-append
"not test_connect_timeout"
" and not test_that_send_cause_async_client_to_be_not_"
"closed"
" and not test_that_async_client_caused_warning_when_"
"being_deleted"
" and not test_that_send_cause_client_to_be_not_closed"
" and not test_async_proxy_close"
" and not test_sync_proxy_close")))))))
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv" "-k"
;; These tests try to open an outgoing connection.
(string-append
"not test_connect_timeout"
" and not test_that_send_cause_async_client_to_be_not_"
"closed"
" and not test_that_async_client_caused_warning_when_"
"being_deleted"
" and not test_that_send_cause_client_to_be_not_closed"
" and not test_async_proxy_close"
" and not test_sync_proxy_close"))))))))
(native-inputs
`(("python-autoflake" ,python-autoflake)
("python-black" ,python-black)