Skip to content

Commit

Permalink
Update all test known-working files
Browse files Browse the repository at this point in the history
  • Loading branch information
Anvil committed Dec 10, 2023
1 parent 3b420b3 commit 0831743
Show file tree
Hide file tree
Showing 183 changed files with 660 additions and 1,005 deletions.
30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_args_any_any.py

This file was deleted.

30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_args_any_str.py

This file was deleted.

30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_args_int_any.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
import asyncio
from typing import Any

from kaioretry import Retry, Context
from kaioretry import retry, aioretry, Retry, Context


aioretry_decorator = Retry(
exceptions=(ValueError, NotImplementedError),
context=Context(tries=5, delay=2)).aioretry

async def func(*args: int) -> str:
''' ... '''
return 'return_value'
func = aioretry_decorator(func)

wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func)


async def use_decoration(parameter: str) -> str:
''' obtain result and use it '''
result = await func(1, 2)
result = await wrapped(1, 2)
assert isinstance(result, str)
return f"parameter is {parameter}. result is {result}"

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
import asyncio
from typing import Any

from kaioretry import Retry, Context
from kaioretry import retry, aioretry, Retry, Context


aioretry_decorator = Retry(
exceptions=(ValueError, NotImplementedError),
context=Context(tries=5, delay=2)).aioretry

async def func(**kwargs: int) -> str:
''' ... '''
return 'return_value'
func = aioretry_decorator(func)

wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func)


async def use_decoration(parameter: str) -> str:
''' obtain result and use it '''
result = await func(x=1, y=2)
result = await wrapped(x=1, y=2)
assert isinstance(result, str)
return f"parameter is {parameter}. result is {result}"

Expand Down
30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_param_any_any.py

This file was deleted.

30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_param_any_str.py

This file was deleted.

30 changes: 0 additions & 30 deletions test/static_analysis/aioretry_built_by_call_async_param_int_any.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
import asyncio
from typing import Any

from kaioretry import Retry, Context
from kaioretry import retry, aioretry, Retry, Context


aioretry_decorator = Retry(
exceptions=(ValueError, NotImplementedError),
context=Context(tries=5, delay=2)).aioretry

async def func(x: int, y: int) -> str:
''' ... '''
return 'return_value'
func = aioretry_decorator(func)

wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func)


async def use_decoration(parameter: str) -> str:
''' obtain result and use it '''
result = await func(1, 2)
result = await wrapped(1, 2)
assert isinstance(result, str)
return f"parameter is {parameter}. result is {result}"

Expand Down
11 changes: 4 additions & 7 deletions test/static_analysis/aioretry_built_by_call_sync_args_any_any.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
import asyncio
from typing import Any

from kaioretry import Retry, Context
from kaioretry import retry, aioretry, Retry, Context


aioretry_decorator = Retry(
exceptions=(ValueError, NotImplementedError),
context=Context(tries=5, delay=2)).aioretry

def func(*args: Any) -> Any:
''' ... '''
return 'return_value'
func = aioretry_decorator(func)

wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func)


async def use_decoration(parameter: str) -> str:
''' obtain result and use it '''
result = await func(1, 2)
result = await wrapped(1, 2)
assert isinstance(result, str)
return f"parameter is {parameter}. result is {result}"

Expand Down
Loading

0 comments on commit 0831743

Please sign in to comment.