Skip to content

Commit

Permalink
python310Packages.nbclient: run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored and erictapen committed May 5, 2022
1 parent c01480f commit f0255a6
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions pkgs/development/python-modules/nbclient/default.nix
@@ -1,9 +1,19 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
async_generator, traitlets, nbformat, nest-asyncio, jupyter-client,
pytest, xmltodict, nbconvert, ipywidgets
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, async_generator
, traitlets
, nbformat
, nest-asyncio
, jupyter-client
, pytestCheckHook
, xmltodict
, nbconvert
, ipywidgets
}:

buildPythonPackage rec {
let nbclient = buildPythonPackage rec {
pname = "nbclient";
version = "0.6.2";
format = "setuptools";
Expand All @@ -15,14 +25,26 @@ buildPythonPackage rec {
hash = "sha256-i0dVPxztB3zXxFN/1dcB1G92gfJLKCdeXMHTR+fJtGs=";
};

doCheck = false; # Avoid infinite recursion
checkInputs = [ pytest xmltodict nbconvert ipywidgets ];
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; {
homepage = "https://github.com/jupyter/nbclient";
description = "A client library for executing notebooks";
license = licenses.bsd3;
maintainers = [ maintainers.erictapen ];
};
}
};
in nbclient

0 comments on commit f0255a6

Please sign in to comment.