guix-commits
[Top][All Lists]
Advanced

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

151/163: gnu: python-apispec: Do not set PYTHONPATH.


From: guix-commits
Subject: 151/163: gnu: python-apispec: Do not set PYTHONPATH.
Date: Mon, 25 Jan 2021 02:02:02 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit f44781bcbcaa87a5f46f10f01fb2b6f6740062c8
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Jan 24 10:44:51 2021 -0500

    gnu: python-apispec: Do not set PYTHONPATH.
    
    * gnu/packages/python-xyz.scm (python-apispec)
    {disable-prance-tests}: Remove phase.
    [phases]{check}: Do not set PYTHONPATH.  Exclude the tests using the CLI of
    Pytest.
---
 gnu/packages/python-xyz.scm | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ea7ad17..cf7abbb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16428,19 +16428,13 @@ complex datatypes to and from native Python 
datatypes.")
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'disable-prance-tests
-                    (lambda _
-                      ;; Disable validation tests since they require the
-                      ;; optional 'prance' library which is not yet in Guix.
-                      (substitute* "tests/test_ext_marshmallow_openapi.py"
-                        (("def test_openapi_tools_validate.*" all)
-                         (string-append "@pytest.mark.xfail\n" all)))))
                   (replace 'check
                     (lambda _
-                      (setenv "PYTHONPATH"
-                              (string-append "./build/lib:"
-                                             (getenv "PYTHONPATH")))
-                      (invoke "pytest" "-vv"))))))
+                      (invoke "pytest" "-vv"
+                              ;; Disable validation tests since they require
+                              ;; the optional 'prance' library which is not
+                              ;; yet in Guix.
+                              "-k" "not openapi_tools_validate"))))))
     (propagated-inputs
      `(("python-pyyaml" ,python-pyyaml)))
     (native-inputs



reply via email to

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