lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

python3Packages.ipykernel: add missing deps and split off tests

The package now requires debugpy and the tests require ipyparallel.

The latter causes an infinite recursion, which is why I split out the
tests into `passthru.tests.pytest`. There is not dedicated tests output,
because the tests require relative imports.

+72 -32
+15 -32
pkgs/development/python-modules/ipykernel/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , buildPythonPackage 4 + , callPackage 4 5 , fetchPypi 5 - , flaky 6 + , debugpy 6 7 , ipython 7 8 , jupyter_client 8 - , traitlets 9 9 , tornado 10 + , traitlets 10 11 , pythonOlder 11 - , pytestCheckHook 12 - , nose 13 12 }: 14 13 15 14 buildPythonPackage rec { ··· 21 20 sha256 = "4439459f171d77f35b7f7e72dace5d7c2dd10a5c9e2c22b173ad9048fbfe7656"; 22 21 }; 23 22 24 - propagatedBuildInputs = [ ipython jupyter_client traitlets tornado ]; 23 + propagatedBuildInputs = [ 24 + debugpy 25 + ipython 26 + jupyter_client 27 + tornado 28 + traitlets 29 + ]; 25 30 26 - checkInputs = [ pytestCheckHook nose flaky ]; 27 - dontUseSetuptoolsCheck = true; 28 - preCheck = '' 29 - export HOME=$(mktemp -d) 30 - ''; 31 - disabledTests = lib.optionals stdenv.isDarwin ([ 32 - # see https://github.com/NixOS/nixpkgs/issues/76197 33 - "test_subprocess_print" 34 - "test_subprocess_error" 35 - "test_ipython_start_kernel_no_userns" 31 + # check in passthru.tests.pytest to escape infinite recursion with ipyparallel 32 + doCheck = false; 36 33 37 - # https://github.com/ipython/ipykernel/issues/506 38 - "test_unc_paths" 39 - ] ++ lib.optionals (pythonOlder "3.8") [ 40 - # flaky test https://github.com/ipython/ipykernel/issues/485 41 - "test_shutdown" 42 - 43 - # test regression https://github.com/ipython/ipykernel/issues/486 44 - "test_sys_path_profile_dir" 45 - "test_save_history" 46 - "test_help_output" 47 - "test_write_kernel_spec" 48 - "test_ipython_start_kernel_userns" 49 - "ZMQDisplayPublisherTests" 50 - ]); 51 - 52 - # Some of the tests use localhost networking. 53 - __darwinAllowLocalNetworking = true; 34 + passthru.tests = { 35 + pytest = callPackage ./tests.nix { }; 36 + }; 54 37 55 38 meta = { 56 39 description = "IPython Kernel for Jupyter";
+57
pkgs/development/python-modules/ipykernel/tests.nix
··· 1 + { lib 2 + , stdenv 3 + , buildPythonPackage 4 + , pythonOlder 5 + , flaky 6 + , ipykernel 7 + , ipyparallel 8 + , nose 9 + , pytestCheckHook 10 + 11 + }: 12 + 13 + buildPythonPackage rec { 14 + pname = "ipykernel-tests"; 15 + inherit (ipykernel) version; 16 + 17 + src = ipykernel.src; 18 + 19 + dontBuild = true; 20 + dontInstall = true; 21 + 22 + checkInputs = [ 23 + flaky 24 + ipykernel 25 + ipyparallel 26 + nose 27 + pytestCheckHook 28 + ]; 29 + 30 + preCheck = '' 31 + export HOME=$(mktemp -d) 32 + ''; 33 + 34 + disabledTests = lib.optionals stdenv.isDarwin ([ 35 + # see https://github.com/NixOS/nixpkgs/issues/76197 36 + "test_subprocess_print" 37 + "test_subprocess_error" 38 + "test_ipython_start_kernel_no_userns" 39 + 40 + # https://github.com/ipython/ipykernel/issues/506 41 + "test_unc_paths" 42 + ] ++ lib.optionals (pythonOlder "3.8") [ 43 + # flaky test https://github.com/ipython/ipykernel/issues/485 44 + "test_shutdown" 45 + 46 + # test regression https://github.com/ipython/ipykernel/issues/486 47 + "test_sys_path_profile_dir" 48 + "test_save_history" 49 + "test_help_output" 50 + "test_write_kernel_spec" 51 + "test_ipython_start_kernel_userns" 52 + "ZMQDisplayPublisherTests" 53 + ]); 54 + 55 + # Some of the tests use localhost networking. 56 + __darwinAllowLocalNetworking = true; 57 + }