From 6bea16b3c2fee09901e3b4ee58dd391835c3f4b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:19:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/services/sessions/test_manager.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/services/sessions/test_manager.py b/tests/services/sessions/test_manager.py index 1ff468ac7..fc756b085 100644 --- a/tests/services/sessions/test_manager.py +++ b/tests/services/sessions/test_manager.py @@ -1,5 +1,6 @@ import asyncio from datetime import datetime + import pytest from tornado import web from traitlets import TraitError @@ -317,15 +318,20 @@ async def test_update_session(session_manager): } assert model == expected + async def test_update_session_with_custom_env_vars(session_manager): - custom_env_vars= {'test_env_name': 'test_env_value'} + custom_env_vars = {"test_env_name": "test_env_value"} await session_manager.create_session( - path="/path/to/test.ipynb", kernel_name="julia", type="notebook", custom_env_vars=custom_env_vars, + path="/path/to/test.ipynb", + kernel_name="julia", + type="notebook", + custom_env_vars=custom_env_vars, ) kernel_id = "A" custom_envs = session_manager._custom_envs[kernel_id] - expected = 'test_env_value' - assert custom_envs['test_env_name'] == expected + expected = "test_env_value" + assert custom_envs["test_env_name"] == expected + async def test_bad_update_session(session_manager): # try to update a session with a bad keyword ~ raise error