Skip to content

Commit

Permalink
fix: ignore last_activity from kernel info
Browse files Browse the repository at this point in the history
  • Loading branch information
hlouzada committed Sep 30, 2024
1 parent 0ad7196 commit c44f8ab
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions spyder/plugins/remoteclient/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,22 @@ def test_start_kernel_running_server(
remote_client_id: str,
):
"""Test starting a kernel on a remote server."""
kernel_info = await_future(
started_kernel_info = await_future(
remote_client._start_new_kernel(remote_client_id),
)

assert (
await_future(
remote_client._get_kernel_info(
remote_client_id,
kernel_info["id"],
),
)
== kernel_info
current_kernel_info = await_future(
remote_client._get_kernel_info(
remote_client_id,
started_kernel_info["id"],
),
)

started_kernel_info.pop("last_activity")
current_kernel_info.pop("last_activity")

assert started_kernel_info == current_kernel_info

def test_shutdown_kernel(
self,
remote_client: RemoteClient,
Expand Down Expand Up @@ -97,21 +99,23 @@ def test_new_kernel(
remote_client_id: str,
):
"""Test starting a kernel with no remote server installed."""
kernel_info = await_future(
started_kernel_info = await_future(
remote_client._start_new_kernel(remote_client_id),
timeout=180,
)
self.kernel_id = kernel_info["id"]
assert (
await_future(
remote_client._get_kernel_info(
remote_client_id,
self.kernel_id,
),
)
== kernel_info

current_kernel_info = await_future(
remote_client._get_kernel_info(
remote_client_id,
started_kernel_info["id"],
),
)

started_kernel_info.pop("last_activity")
current_kernel_info.pop("last_activity")

assert started_kernel_info == current_kernel_info

def test_restart_kernel(
self,
remote_client: RemoteClient,
Expand Down

0 comments on commit c44f8ab

Please sign in to comment.