Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 9, 2024
1 parent b0feeba commit 6bea16b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/services/sessions/test_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
from datetime import datetime

import pytest
from tornado import web
from traitlets import TraitError
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6bea16b

Please sign in to comment.