From 3eeae68af1f95448c8a4ebf98d7b49ccb86f273e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 24 Oct 2021 20:49:46 +0000 Subject: 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. --- gnu/packages/python-web.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 @@ than Python’s urllib2 library.") (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) -- cgit v1.2.3