guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/07: gnu: python-requests-unixsocket: Fix tests.


From: guix-commits
Subject: 01/07: gnu: python-requests-unixsocket: Fix tests.
Date: Mon, 25 Oct 2021 01:30:28 -0400 (EDT)

rekado pushed a commit to branch core-updates-frozen
in repository guix.

commit 3eeae68af1f95448c8a4ebf98d7b49ccb86f273e
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sun Oct 24 20:49:46 2021 +0000

    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 453ec47..7787003 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]