From 95ccbad8511340d3682940a002aa59a3e1adb71e Mon Sep 17 00:00:00 2001 From: Maximilian Stein Date: Wed, 13 Nov 2024 15:17:55 +0100 Subject: [PATCH] fix tests --- tests/test_cron.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_cron.py b/tests/test_cron.py index bfae856..8311671 100644 --- a/tests/test_cron.py +++ b/tests/test_cron.py @@ -14,7 +14,7 @@ class CustomError(Exception): def test_str(): loop = asyncio.new_event_loop() - @crontab("* * * * * *", loop=loop) + @crontab("* * * * *", loop=loop) def t(): pass @@ -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) @@ -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() @@ -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) @@ -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 @@ -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() @@ -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 @@ -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()