From c4e99689dab39d5630efa2ee421d868b4a27d821 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Thu, 1 Dec 2022 12:12:13 +0100 Subject: [PATCH] Fix tests --- jupyter_server/gateway/managers.py | 2 +- tests/services/kernels/test_api.py | 6 +++--- tests/services/kernels/test_config.py | 4 ++-- tests/services/kernels/test_connection.py | 2 +- tests/services/kernels/test_cull.py | 6 +++--- tests/services/sessions/test_api.py | 6 +++--- tests/services/sessions/test_manager.py | 4 ++-- tests/test_serialize.py | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/jupyter_server/gateway/managers.py b/jupyter_server/gateway/managers.py index ea4bdbd394..423148fa81 100644 --- a/jupyter_server/gateway/managers.py +++ b/jupyter_server/gateway/managers.py @@ -22,7 +22,7 @@ from traitlets import DottedObjectName, Instance, Type, default from .._tz import UTC -from ..services.sessions.sessionmanager import SessionManager +from jupyter_server_kernels.sessions.sessionmanager import SessionManager from ..utils import ensure_async, url_path_join from .gateway_client import GatewayClient, gateway_request diff --git a/tests/services/kernels/test_api.py b/tests/services/kernels/test_api.py index dfbf1a47bc..3d34b5e47c 100644 --- a/tests/services/kernels/test_api.py +++ b/tests/services/kernels/test_api.py @@ -50,12 +50,12 @@ async def _(kernel_id, ready=None): configs: list = [ { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.MappingKernelManager" + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.MappingKernelManager" } }, { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager" + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager" } }, ] @@ -68,7 +68,7 @@ async def _(kernel_id, ready=None): # Add a pending kernels condition c = { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager" + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager" }, "AsyncMappingKernelManager": {"use_pending_kernels": True}, } diff --git a/tests/services/kernels/test_config.py b/tests/services/kernels/test_config.py index 1db2e11b1f..ba31f16998 100644 --- a/tests/services/kernels/test_config.py +++ b/tests/services/kernels/test_config.py @@ -1,7 +1,7 @@ import pytest from traitlets.config import Config -from jupyter_server.services.kernels.kernelmanager import AsyncMappingKernelManager +from jupyter_server_kernels.kernels.kernelmanager import AsyncMappingKernelManager @pytest.fixture @@ -17,7 +17,7 @@ def test_config(jp_serverapp): def test_async_kernel_manager(jp_configurable_serverapp): argv = [ - "--ServerApp.kernel_manager_class=jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager" + "--ServerApp.kernel_manager_class=jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager" ] app = jp_configurable_serverapp(argv=argv) assert isinstance(app.kernel_manager, AsyncMappingKernelManager) diff --git a/tests/services/kernels/test_connection.py b/tests/services/kernels/test_connection.py index 1022eb3cd4..d6eed57dc3 100644 --- a/tests/services/kernels/test_connection.py +++ b/tests/services/kernels/test_connection.py @@ -8,7 +8,7 @@ from tornado.websocket import WebSocketHandler from jupyter_server.serverapp import ServerApp -from jupyter_server.services.kernels.connection.channels import ( +from jupyter_server_kernels.kernels.connection.channels import ( ZMQChannelsWebsocketConnection, ) diff --git a/tests/services/kernels/test_cull.py b/tests/services/kernels/test_cull.py index 88402a1e04..92655b7395 100644 --- a/tests/services/kernels/test_cull.py +++ b/tests/services/kernels/test_cull.py @@ -31,7 +31,7 @@ def suppress_deprecation_warnings(): Config( { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.MappingKernelManager", + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.MappingKernelManager", "MappingKernelManager": { "cull_idle_timeout": CULL_TIMEOUT, "cull_interval": CULL_INTERVAL, @@ -44,7 +44,7 @@ def suppress_deprecation_warnings(): Config( { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager", + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager", "AsyncMappingKernelManager": { "cull_idle_timeout": CULL_TIMEOUT, "cull_interval": CULL_INTERVAL, @@ -86,7 +86,7 @@ async def test_cull_idle(jp_fetch, jp_ws_fetch): Config( { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager", + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager", "AsyncMappingKernelManager": { "cull_idle_timeout": CULL_TIMEOUT, "cull_interval": CULL_INTERVAL, diff --git a/tests/services/sessions/test_api.py b/tests/services/sessions/test_api.py index a307af345b..4f9fa8c8e6 100644 --- a/tests/services/sessions/test_api.py +++ b/tests/services/sessions/test_api.py @@ -15,7 +15,7 @@ from tornado.httpclient import HTTPClientError from traitlets import default -from jupyter_server.services.kernels.kernelmanager import AsyncMappingKernelManager +from jupyter_server_kernels.kernels.kernelmanager import AsyncMappingKernelManager from jupyter_server.utils import url_path_join from ...utils import expected_http_error @@ -58,12 +58,12 @@ def _default_kernel_manager_class(self): configs: list = [ { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.MappingKernelManager" + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.MappingKernelManager" } }, { "ServerApp": { - "kernel_manager_class": "jupyter_server.services.kernels.kernelmanager.AsyncMappingKernelManager" + "kernel_manager_class": "jupyter_server_kernels.kernels.kernelmanager.AsyncMappingKernelManager" } }, { diff --git a/tests/services/sessions/test_manager.py b/tests/services/sessions/test_manager.py index 48d5761746..ffc398dc56 100644 --- a/tests/services/sessions/test_manager.py +++ b/tests/services/sessions/test_manager.py @@ -6,8 +6,8 @@ from jupyter_server._tz import isoformat, utcnow from jupyter_server.services.contents.manager import ContentsManager -from jupyter_server.services.kernels.kernelmanager import MappingKernelManager -from jupyter_server.services.sessions.sessionmanager import ( +from jupyter_server_kernels.kernels.kernelmanager import MappingKernelManager +from jupyter_server_kernels.sessions.sessionmanager import ( KernelSessionRecord, KernelSessionRecordConflict, KernelSessionRecordList, diff --git a/tests/test_serialize.py b/tests/test_serialize.py index 28be8e03b0..a8c3a6e6b5 100644 --- a/tests/test_serialize.py +++ b/tests/test_serialize.py @@ -3,7 +3,7 @@ from jupyter_client.session import Session -from jupyter_server.services.kernels.connection.base import ( +from jupyter_server_kernels.kernels.connection.base import ( deserialize_binary_message, serialize_binary_message, )