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.
This commit is contained in:
Maxim Cournoyer 2021-01-24 10:44:51 -05:00
parent a0557f7ed7
commit 9e906e8d3b
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -16460,19 +16460,13 @@ (define-public python-apispec
(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