aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-10-24 20:49:46 +0000
committerRicardo Wurmus <rekado@elephly.net>2021-10-24 20:49:46 +0000
commit3eeae68af1f95448c8a4ebf98d7b49ccb86f273e (patch)
treef9b45b0264f18b1c42edb0ff4070bc6fc3f5b26e /gnu
parentb67013c8ca28c5f5b5c5e1eeb869870c2c1dabe9 (diff)
downloadguix-3eeae68af1f95448c8a4ebf98d7b49ccb86f273e.tar.gz
guix-3eeae68af1f95448c8a4ebf98d7b49ccb86f273e.zip
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-web.scm10
1 files 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)