Skip to content

Commit

Permalink
Fix imports in test_embedded_ipython_code_executor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Jan 22, 2025
1 parent 32eda33 commit f7a538c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/coding/test_embedded_ipython_code_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
)
from autogen.coding.base import CodeBlock, CodeExecutor
from autogen.coding.factory import CodeExecutorFactory
from autogen.coding.jupyter import (
DockerJupyterServer,
EmbeddedIPythonCodeExecutor,
JupyterCodeExecutor,
LocalJupyterServer,
)
from autogen.import_utils import optional_import_block

from ..conftest import MOCK_OPEN_AI_API_KEY
Expand All @@ -37,7 +31,18 @@

classes_to_test = []
with optional_import_block() as result:
import websocket # noqa: F401
from jupyter_client import KernelManager # noqa: F401
from jupyter_client.kernelspec import KernelSpecManager # noqa: F401

# This has to be here
# because autogen.coding.jupyter.helpers is written in a way that it will raise an ImportError
from autogen.coding.jupyter import (
DockerJupyterServer,
EmbeddedIPythonCodeExecutor,
JupyterCodeExecutor,
LocalJupyterServer,
)

if result.is_successful:

Expand Down

0 comments on commit f7a538c

Please sign in to comment.