python310Packages.nbclient: run tests

main
Sandro Jäckel 2 years ago committed by Kerstin
parent c01480f0a3
commit f0255a6fce
  1. 36
      pkgs/development/python-modules/nbclient/default.nix

@ -1,9 +1,19 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder, { lib
async_generator, traitlets, nbformat, nest-asyncio, jupyter-client, , buildPythonPackage
pytest, xmltodict, nbconvert, ipywidgets , fetchPypi
, pythonOlder
, async_generator
, traitlets
, nbformat
, nest-asyncio
, jupyter-client
, pytestCheckHook
, xmltodict
, nbconvert
, ipywidgets
}: }:
buildPythonPackage rec { let nbclient = buildPythonPackage rec {
pname = "nbclient"; pname = "nbclient";
version = "0.6.2"; version = "0.6.2";
format = "setuptools"; format = "setuptools";
@ -15,14 +25,26 @@ buildPythonPackage rec {
hash = "sha256-i0dVPxztB3zXxFN/1dcB1G92gfJLKCdeXMHTR+fJtGs="; hash = "sha256-i0dVPxztB3zXxFN/1dcB1G92gfJLKCdeXMHTR+fJtGs=";
}; };
doCheck = false; # Avoid infinite recursion
checkInputs = [ pytest xmltodict nbconvert ipywidgets ];
propagatedBuildInputs = [ async_generator traitlets nbformat nest-asyncio jupyter-client ]; propagatedBuildInputs = [ async_generator traitlets nbformat nest-asyncio jupyter-client ];
# circular dependencies if enabled by default
doCheck = false;
checkInputs = [ pytestCheckHook xmltodict nbconvert ipywidgets ];
preCheck = ''
export HOME=$(mktemp -d)
'';
passthru.tests = {
check = nbclient.overridePythonAttrs (_: { doCheck = true; });
};
meta = with lib; { meta = with lib; {
homepage = "https://github.com/jupyter/nbclient"; homepage = "https://github.com/jupyter/nbclient";
description = "A client library for executing notebooks"; description = "A client library for executing notebooks";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.erictapen ]; maintainers = [ maintainers.erictapen ];
}; };
} };
in nbclient

Loading…
Cancel
Save