me
/
guix
Archived
1
0
Fork 0

gnu: python-typer: Run more tests.

* gnu/packages/python-xyz.scm (python-typer)[arguments]: Delete phase
'disable-failing-tests; disable only test_show_completion and
test_install_completion in 'check phase; add phase 'patch-shell-reference.
master
Ricardo Wurmus 2021-11-18 16:58:44 +00:00
parent 28b92acf6b
commit 9e76a5b7cb
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 17 additions and 17 deletions

View File

@ -20855,30 +20855,30 @@ based on the CPython 2.7 and 3.7 parsers.")
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'check 'disable-failing-tests ;; Unfortunately, this doesn't seem to be enough to fix these two
;; tests, but we'll patch this anyway.
(add-after 'unpack 'patch-shell-reference
(lambda _ (lambda _
(substitute* "tests/test_completion/test_completion.py" (substitute* "tests/test_completion/test_completion.py"
(("def test_show_completion") (("\"bash\"") (string-append "\"" (which "bash") "\""))
"def _test_show_completion") (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
(("def test_install_completion")
"def _test_install_completion"))
(substitute* "tests/test_completion/test_completion_install.py"
(("def test_completion_install_bash")
"def _test_completion_install_bash")
(("def test_completion_install_zsh")
"def _test_completion_install_zsh")
(("def test_completion_install_fish")
"def _test_completion_install_fish")
(("def test_completion_install_powershell")
"def _test_completion_install_powershell"))
#t))
(replace 'check (replace 'check
(lambda _ (lambda _
(setenv "HOME" "/tmp") ; some tests need it
;; This is for completion tests
(with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
(setenv "PYTHONPATH" (setenv "PYTHONPATH"
(string-append (getcwd) ":" (string-append (getcwd) ":"
(getenv "PYTHONPATH"))) (getenv "PYTHONPATH")))
(invoke "python" "-m" "pytest" "tests/") (let ((disabled-tests (list "test_show_completion"
#t))))) "test_install_completion")))
(invoke "python" "-m" "pytest" "tests/"
"-k"
(string-append "not "
(string-join disabled-tests
" and not ")))))))))
(propagated-inputs (propagated-inputs
`(("python-click" ,python-click))) `(("python-click" ,python-click)))
(native-inputs (native-inputs