diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2024-05-06 22:45:14 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-13 20:18:38 +0000 |
commit | f5888342ab8015618259f22bea47b4bb5e42c146 (patch) | |
tree | 6c9c13f97e2ede93e3a6d536aa06a5d175060d0f /gnu/packages/jupyter.scm | |
parent | 5748c809e01f4cb86ed09076dfd6a359021d9e9c (diff) |
gnu: Add python-pytest-jupyter.
* gnu/packages/jupyter.scm (python-pytest-jupyter): New variable.
Change-Id: Id8d59a3981c5c46adbfee7d369692cba32e27d70
Diffstat (limited to 'gnu/packages/jupyter.scm')
-rw-r--r-- | gnu/packages/jupyter.scm | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index c485e68b9c..68b17e7e81 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2022 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021-2024 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> @@ -169,6 +169,52 @@ tests kernels for successful code execution and conformance with the Messaging Protocol}.") (license license:bsd-3))) +(define-public python-pytest-jupyter + (package + (name "python-pytest-jupyter") + (version "0.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest_jupyter" version)) + (sha256 + (base32 "114y9py29j6p2iymhc3vj55x65gg1ncbhwal5mads0g2z7p59pq0")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; This requires python-jupyter-server, which itself requires this + ;; package. + '(list "--ignore=tests/test_jupyter_server.py") + #:phases + '(modify-phases %standard-phases + ;; The jupyter_server tests requires python-jupyter-server, which + ;; itself requires this package. + (add-after 'unpack 'disable-tests + (lambda _ + (substitute* "tests/conftest.py" + (("\"pytest_jupyter.jupyter_server\",") "")))) + ;; Some tests require a writable HOME + (add-before 'check 'set-HOME + (lambda _ (setenv "HOME" "/tmp"))) + (add-after 'unpack 'ignore-deprecation-warnings + (lambda _ + (substitute* "pyproject.toml" + ((" \"module:datetime.*" m) + (string-append m "\n\"ignore:zmq.eventloop.ioloop is deprecated:DeprecationWarning\",")))))))) + (propagated-inputs (list python-jupyter-core python-nbformat)) + (native-inputs (list python-hatchling + python-ipykernel + python-pytest + python-pytest-timeout + python-tornado-6)) + (home-page "https://jupyter.org") + (synopsis "Pytest plugin for testing Jupyter libraries and extensions.") + (description + "This package provides a pytest plugin for testing Jupyter libraries and +extensions.") + (license license:bsd-4))) + (define-public xeus (package (name "xeus") |