gnu: python-requests-unixsocket: Fix tests.

* gnu/packages/python-web.scm (python-requests-unixsocket)[arguments]: Do not
run tests with --pep8 option; only run tests when enabled.
This commit is contained in:
Ricardo Wurmus 2021-10-24 20:49:46 +00:00
parent b67013c8ca
commit 3eeae68af1
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -2559,9 +2559,13 @@ (define-public python-requests-unixsocket
(substitute* "test-requirements.txt"
(("(.*)==(.*)" _ name) (string-append name "\n")))))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
;; Avoid a deprecation error.
(substitute* "pytest.ini"
(("--pep8") ""))
(when tests?
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv")))))))
(propagated-inputs
`(("python-pbr" ,python-pbr)
("python-requests" ,python-requests)