diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 453ec47f72..7787003f03 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -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)