diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index 38e6394f82f..85f07b182d8 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -18,6 +18,13 @@ , tornado , traitlets , nodePackages +, beautifulsoup4 +, cryptography +, notebook +, pytest-asyncio +, pytestCheckHook +, requests-mock +, virtualenv }: let @@ -120,9 +127,28 @@ buildPythonPackage rec { traitlets ]; - # Disable tests because they take an excessive amount of time to complete. - doCheck = false; + preCheck = '' + substituteInPlace jupyterhub/tests/test_spawner.py --replace \ + "'jupyterhub-singleuser'" "'$out/bin/jupyterhub-singleuser'" + ''; + checkInputs = [ + # https://github.com/jupyterhub/jupyterhub/blob/master/dev-requirements.txt + beautifulsoup4 + cryptography + notebook + pytest-asyncio + pytestCheckHook + requests-mock + virtualenv + ]; + + disabledTests = [ + # Tries to install older versions through pip + "test_upgrade" + # Testcase fails to find requests import + "test_external_service" + ]; meta = with lib; { description = "Serves multiple Jupyter notebook instances";