1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, flaky 6, ipykernel 7, ipyparallel 8, nose 9, pytestCheckHook 10 11}: 12 13buildPythonPackage 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}