mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-17 12:30:38 +02:00
gnu: python-jupyter-core: Enable tests.
* gnu/packages/python-xyz.scm (python-jupyter-core) [arguments]: Enable tests. [native-inputs]: Add test dependencies.
This commit is contained in:
parent
1683e9d967
commit
51646c5435
1 changed files with 24 additions and 2 deletions
|
@ -7384,10 +7384,32 @@ without using the configuration machinery.")
|
||||||
(base32
|
(base32
|
||||||
"1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
|
"1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
;; FIXME: not sure how to run the tests
|
(arguments
|
||||||
(arguments `(#:tests? #f))
|
`(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
; Some tests write to $HOME.
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
|
; Some tests load the installed package.
|
||||||
|
(add-installed-pythonpath inputs outputs)
|
||||||
|
(invoke "pytest" "-vv"))))
|
||||||
|
(add-after 'unpack 'patch-testsuite
|
||||||
|
(lambda _
|
||||||
|
;; test_not_on_path() and test_path_priority() try to run a test
|
||||||
|
;; that loads jupyter_core, so we need PYTHONPATH
|
||||||
|
(substitute* "jupyter_core/tests/test_command.py"
|
||||||
|
(("env = \\{'PATH': ''\\}")
|
||||||
|
"env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
|
||||||
|
(("env = \\{'PATH': str\\(b\\)\\}")
|
||||||
|
"env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
|
||||||
|
#t)))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-traitlets" ,python-traitlets)))
|
`(("python-traitlets" ,python-traitlets)))
|
||||||
|
(native-inputs
|
||||||
|
`(("python-six" ,python-six)
|
||||||
|
("python-pytest" ,python-pytest)))
|
||||||
;; This package provides the `jupyter` binary and thus also exports the
|
;; This package provides the `jupyter` binary and thus also exports the
|
||||||
;; search paths.
|
;; search paths.
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue