Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
st31ny committed Nov 13, 2024
1 parent 76a74d4 commit 95ccbad
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CustomError(Exception):
def test_str():
loop = asyncio.new_event_loop()

@crontab("* * * * * *", loop=loop)
@crontab("* * * * *", loop=loop)
def t():
pass

Expand All @@ -26,7 +26,7 @@ def test_cron():

future = asyncio.Future(loop=loop)

@crontab("* * * * * *", start=False, loop=loop)
@crontab("* * * * *", start=False, loop=loop)
def t():
future.set_result(1)

Expand All @@ -41,7 +41,7 @@ def test_raise():

future = asyncio.Future(loop=loop)

@crontab("* * * * * *", start=False, loop=loop)
@crontab("* * * * *", start=False, loop=loop)
def t():
loop.call_later(1, future.set_result, 1)
raise ValueError()
Expand All @@ -58,7 +58,7 @@ def test_next():
def t():
return 1

t = crontab("* * * * * *", func=t, loop=loop)
t = crontab("* * * * *", func=t, loop=loop)

future = asyncio.ensure_future(t.next(), loop=loop)

Expand All @@ -69,7 +69,7 @@ def t():
def test_null_callback():
loop = asyncio.new_event_loop()

t = crontab("* * * * * *", loop=loop)
t = crontab("* * * * *", loop=loop)

assert t.handle is None # not started

Expand All @@ -82,7 +82,7 @@ def test_null_callback():
def test_next_raise():
loop = asyncio.new_event_loop()

@crontab("* * * * * *", loop=loop)
@crontab("* * * * *", loop=loop)
def t():
raise CustomError()

Expand All @@ -95,7 +95,7 @@ def t():
def test_coro_next():
loop = asyncio.new_event_loop()

@crontab("* * * * * *", loop=loop)
@crontab("* * * * *", loop=loop)
async def t():
return 1

Expand All @@ -108,7 +108,7 @@ async def t():
def test_coro_next_raise():
loop = asyncio.new_event_loop()

@crontab("* * * * * *", loop=loop)
@crontab("* * * * *", loop=loop)
async def t():
raise CustomError()

Expand Down

0 comments on commit 95ccbad

Please sign in to comment.