From c379aa9f8e4d1d43b7cd1d549a49b8f09286fe91 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 16 Aug 2020 19:11:12 -0700 Subject: [PATCH] python3Packages.notebook: fix tests --- .../python-modules/notebook/default.nix | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 3860c34b880..7ac4bc5fdbe 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -2,6 +2,7 @@ , lib , buildPythonPackage , fetchPypi +, argon2_cffi , nose , nose_warnings_filters , glibcLocales @@ -11,6 +12,7 @@ , tornado , ipython_genutils , traitlets +, jupyter , jupyter_core , jupyter_client , nbformat @@ -21,6 +23,7 @@ , send2trash , pexpect , prometheus_client +, pytestCheckHook }: buildPythonPackage rec { @@ -35,13 +38,13 @@ buildPythonPackage rec { LC_ALL = "en_US.utf8"; - checkInputs = [ nose glibcLocales ] + checkInputs = [ nose pytestCheckHook glibcLocales ] ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]); propagatedBuildInputs = [ jinja2 tornado ipython_genutils traitlets jupyter_core send2trash jupyter_client nbformat nbconvert ipykernel terminado requests pexpect - prometheus_client + prometheus_client argon2_cffi ]; # disable warning_filters @@ -52,18 +55,19 @@ buildPythonPackage rec { postPatch = '' # Remove selenium tests rm -rf notebook/tests/selenium - + export HOME=$TMPDIR ''; - checkPhase = '' - runHook preCheck - mkdir tmp - HOME=tmp nosetests -v ${if (stdenv.isDarwin) then '' - --exclude test_delete \ - --exclude test_checkpoints_follow_file - '' - else ""} - ''; + disabledTests = [ + # a "system_config" is generated, and fails many tests + "config" + "load_ordered" + # requires jupyter, but will cause circular imports + "test_run" + "TestInstallServerExtension" + "launch_socket" + "sock_server" + ]; # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true;