1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, flaky 6, ipykernel 7, ipyparallel 8, nose 9, pytestCheckHook 10 11}: 12 13buildPythonPackage { 14 pname = "ipykernel-tests"; 15 inherit (ipykernel) version src; 16 format = "other"; 17 18 dontBuild = true; 19 dontInstall = true; 20 21 nativeCheckInputs = [ 22 flaky 23 ipykernel 24 ipyparallel 25 nose 26 pytestCheckHook 27 ]; 28 29 preCheck = '' 30 export HOME=$(mktemp -d) 31 ''; 32 33 disabledTests = lib.optionals stdenv.isDarwin ([ 34 # see https://github.com/NixOS/nixpkgs/issues/76197 35 "test_subprocess_print" 36 "test_subprocess_error" 37 "test_ipython_start_kernel_no_userns" 38 39 # https://github.com/ipython/ipykernel/issues/506 40 "test_unc_paths" 41 ] ++ lib.optionals (pythonOlder "3.8") [ 42 # flaky test https://github.com/ipython/ipykernel/issues/485 43 "test_shutdown" 44 45 # test regression https://github.com/ipython/ipykernel/issues/486 46 "test_sys_path_profile_dir" 47 "test_save_history" 48 "test_help_output" 49 "test_write_kernel_spec" 50 "test_ipython_start_kernel_userns" 51 "ZMQDisplayPublisherTests" 52 ]); 53 54 # Some of the tests use localhost networking. 55 __darwinAllowLocalNetworking = true; 56}