Archived
1
0
Fork 0

gnu: python-cfn-lint: Honor #:tests? flag.

* gnu/packages/python-web.scm (python-cfn-lint)[arguments]: Make some cosmetic
changes. Adjust custom 'check phase to honor the #:tests? flag.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Vinicius Monego 2021-11-05 01:58:31 +00:00 committed by Ludovic Courtès
parent f3416ebc2e
commit dbf5d938c5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -514,9 +514,11 @@ emit information from within their applications to the AWS X-Ray service.")
"106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6")))) "106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases (modify-phases %standard-phases `(#:phases
(modify-phases %standard-phases
(replace 'check (replace 'check
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key inputs outputs tests? #:allow-other-keys)
(when tests?
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
;; Remove test for the documentation update scripts ;; Remove test for the documentation update scripts
;; to avoid a dependency on 'git'. ;; to avoid a dependency on 'git'.
@ -524,13 +526,11 @@ emit information from within their applications to the AWS X-Ray service.")
"test/unit/module/maintenance/test_update_documentation.py") "test/unit/module/maintenance/test_update_documentation.py")
(delete-file (delete-file
"test/unit/module/maintenance/test_update_resource_specs.py") "test/unit/module/maintenance/test_update_resource_specs.py")
(setenv "PYTHONPATH" (add-installed-pythonpath inputs outputs)
(string-append "./build/lib:"
(getenv "PYTHONPATH")))
(setenv "PATH" (string-append out "/bin:" (setenv "PATH" (string-append out "/bin:"
(getenv "PATH"))) (getenv "PATH")))
(invoke "python" "-m" "unittest" "discover" "-v" (invoke "python" "-m" "unittest" "discover"
"-s" "test"))))))) "-s" "test"))))))))
(native-inputs (native-inputs
`(("python-pydot" ,python-pydot) `(("python-pydot" ,python-pydot)
("python-mock" ,python-mock))) ("python-mock" ,python-mock)))