Skip to content

Commit

Permalink
feat: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
imotai committed Sep 11, 2023
1 parent 8836116 commit 5eaa110
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions agent/tests/agent_tool_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


@pytest.fixture
async def kernel_sdk():
def kernel_sdk():
sdk = KernelSDK(api_base, api_key)
sdk.connect()
yield sdk
Expand All @@ -40,7 +40,7 @@ async def kernel_sdk():
@pytest.mark.asyncio
async def test_async_smoke_test(kernel_sdk):
code = "print('hello world!')"
sdk = await anext(kernel_sdk)
sdk = kernel_sdk
api = OctopusAPIJsonOutput(sdk, api_data_dir)
result = await api.arun(code)
assert not result["result"]
Expand All @@ -49,7 +49,7 @@ async def test_async_smoke_test(kernel_sdk):

@pytest.mark.asyncio
async def test_get_result(kernel_sdk):
sdk = await anext(kernel_sdk)
sdk = kernel_sdk
code = "5"
api = OctopusAPIJsonOutput(sdk, api_data_dir)
result = await api.arun(code)
Expand All @@ -62,7 +62,7 @@ async def test_get_result(kernel_sdk):

@pytest.mark.asyncio
async def test_sync_smoke_test_markdown(kernel_sdk):
sdk = await anext(kernel_sdk)
sdk = kernel_sdk
code = "print('hello world!')"
api = OctopusAPIMarkdownOutput(sdk, api_data_dir)
result = await api.arun(code)
Expand All @@ -73,7 +73,7 @@ async def test_sync_smoke_test_markdown(kernel_sdk):

@pytest.mark.asyncio
async def test_get_result_markdown(kernel_sdk):
sdk = await anext(kernel_sdk)
sdk = kernel_sdk
code = "5"
api = OctopusAPIMarkdownOutput(sdk, api_data_dir)
result = await api.arun(code)
Expand All @@ -83,7 +83,7 @@ async def test_get_result_markdown(kernel_sdk):

@pytest.mark.asyncio
async def test_display_result(kernel_sdk):
sdk = await anext(kernel_sdk)
sdk = kernel_sdk
code = """
import matplotlib.pyplot as plt
import numpy as np
Expand Down

0 comments on commit 5eaa110

Please sign in to comment.