Remove options from GreatAI.create
This commit is contained in:
parent
612f3ac5e1
commit
b6c7a4b7ca
9 changed files with 24 additions and 83 deletions
|
|
@ -20,20 +20,6 @@ async def test_create_trivial_cases() -> None:
|
|||
|
||||
assert (await hello_world_2("andras")).output == "Hello andras!"
|
||||
|
||||
@GreatAI.create()
|
||||
async def hello_world_3(name: str) -> str:
|
||||
await sleep(0.5)
|
||||
return f"Hello {name}!"
|
||||
|
||||
assert (await hello_world_3("andras")).output == "Hello andras!"
|
||||
|
||||
@GreatAI.create()
|
||||
async def hello_world_4(name): # type: ignore
|
||||
await sleep(0.5)
|
||||
return f"Hello {name}!"
|
||||
|
||||
assert (await hello_world_4("andras")).output == "Hello andras!"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_with_parameter() -> None:
|
||||
|
|
|
|||
|
|
@ -22,18 +22,6 @@ def test_create_trivial_cases() -> None:
|
|||
|
||||
assert hello_world_2("andras").output == "Hello andras!"
|
||||
|
||||
@GreatAI.create()
|
||||
def hello_world_3(name: str) -> str:
|
||||
return f"Hello {name}!"
|
||||
|
||||
assert hello_world_3("andras").output == "Hello andras!"
|
||||
|
||||
@GreatAI.create()
|
||||
def hello_world_4(name): # type: ignore
|
||||
return f"Hello {name}!"
|
||||
|
||||
assert hello_world_4("andras").output == "Hello andras!"
|
||||
|
||||
|
||||
def test_create_with_other_decorator() -> None:
|
||||
@GreatAI.create
|
||||
|
|
@ -44,7 +32,7 @@ def test_create_with_other_decorator() -> None:
|
|||
assert hello_world_1("andras").output == "Hello andras!"
|
||||
|
||||
@lru_cache
|
||||
@GreatAI.create()
|
||||
@GreatAI.create
|
||||
def hello_world_2(name: str) -> str:
|
||||
return f"Hello {name}!"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue