Files
nixpkgs/pkgs/development/python-modules/jupyter-server/default.nix
T
Sandro Jäckel f2ea82d838 python310Packages.jupyter-server: disable failing test_copy_big_dir on all linux
jupyter-server> ___________________ test_copy_big_dir[jp_contents_manager1] ____________________
jupyter-server>
jupyter-server> jp_contents_manager = <jupyter_server.services.contents.filemanager.FileContentsManager object at 0x7ffff1c08460>
jupyter-server>
jupyter-server>     async def test_copy_big_dir(jp_contents_manager):
jupyter-server>         # this tests how the Content API limits preventing copying folders that are more than
jupyter-server>         # the size limit specified in max_copy_folder_size_mb trait
jupyter-server>         cm = jp_contents_manager
jupyter-server>         destDir = "Untitled Folder 1"
jupyter-server>         sourceDir = "Morningstar Notebooks"
jupyter-server>         cm.max_copy_folder_size_mb = 5
jupyter-server>         _make_dir(cm, destDir)
jupyter-server>         _make_big_dir(contents_manager=cm, api_path=sourceDir)
jupyter-server> >       with pytest.raises(HTTPError) as exc_info:
jupyter-server> E       Failed: DID NOT RAISE <class 'tornado.web.HTTPError'>
jupyter-server>
jupyter-server> tests/services/contents/test_manager.py:896: Failed
2023-10-06 20:17:27 +02:00

126 lines
2.6 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, hatch-jupyter-builder
, hatchling
, pytestCheckHook
, pytest-console-scripts
, pytest-jupyter
, pytest-timeout
, argon2-cffi
, jinja2
, tornado
, pyzmq
, ipykernel
, traitlets
, jupyter-core
, jupyter-client
, jupyter-events
, jupyter-server-terminals
, nbformat
, nbconvert
, packaging
, send2trash
, terminado
, prometheus-client
, anyio
, websocket-client
, overrides
, requests
, flaky
}:
buildPythonPackage rec {
pname = "jupyter-server";
version = "2.7.3";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "jupyter_server";
inherit version;
hash = "sha256-1JFshYHE67xTTOvaqOyiR42fO/3Yjq4p/KsBIOrFdkk=";
};
nativeBuildInputs = [
hatch-jupyter-builder
hatchling
];
propagatedBuildInputs = [
argon2-cffi
jinja2
tornado
pyzmq
traitlets
jupyter-core
jupyter-client
jupyter-events
jupyter-server-terminals
nbformat
nbconvert
packaging
send2trash
terminado
prometheus-client
anyio
websocket-client
overrides
];
nativeCheckInputs = [
ipykernel
pytestCheckHook
pytest-console-scripts
pytest-jupyter
pytest-timeout
requests
flaky
];
pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];
preCheck = ''
export HOME=$(mktemp -d)
export PATH=$out/bin:$PATH
'';
disabledTests = [
"test_server_extension_list"
"test_cull_idle"
"test_server_extension_list"
] ++ lib.optionals stdenv.isDarwin [
# attempts to use trashcan, build env doesn't allow this
"test_delete"
# test is presumable broken in sandbox
"test_authorized_requests"
# Insufficient access privileges for operation
"test_regression_is_hidden"
] ++ lib.optionals stdenv.isLinux [
# Failed: DID NOT RAISE <class 'tornado.web.HTTPError'>
"test_copy_big_dir"
];
disabledTestPaths = [
"tests/services/kernels/test_api.py"
"tests/services/sessions/test_api.py"
# nbconvert failed: `relax_add_props` kwargs of validate has been
# deprecated for security reasons, and will be removed soon.
"tests/nbconvert/test_handlers.py"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
changelog = "https://github.com/jupyter-server/jupyter_server/blob/v${version}/CHANGELOG.md";
description = "The backendi.e. core services, APIs, and REST endpointsto Jupyter web applications";
homepage = "https://github.com/jupyter-server/jupyter_server";
license = licenses.bsdOriginal;
maintainers = lib.teams.jupyter.members;
};
}