From cf276c745e4cc9e9776837cbc80336a47a5d2723 Mon Sep 17 00:00:00 2001 From: shiftinv Date: Fri, 28 Apr 2023 17:49:47 +0200 Subject: [PATCH] chore: stuff --- tests/test_events.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_events.py b/tests/test_events.py index e6ce272c39..bba4682f42 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -48,9 +48,8 @@ def test_wait_for(bot: commands.Bot, event) -> None: coro.close() # close coroutine to avoid warning -def _test_typing_wait_for() -> None: +def _test_typing_wait_for(client: disnake.Client, bot: commands.Bot) -> None: expected_type = Coroutine[Any, Any, disnake.Guild] - client = disnake.Client() # valid enum event _ = assert_type(client.wait_for(Event.guild_join), expected_type) @@ -66,8 +65,7 @@ def _test_typing_wait_for() -> None: _ = assert_type(client.wait_for("guild_join", check=lambda: True), Coroutine[Any, Any, Any]) # bot-specific events - bot = commands.Bot(command_prefix=commands.when_mentioned) - _ = client.wait_for(Event.slash_command_error) # type: ignore + _ = client.wait_for(Event.slash_command_error) # type: ignore # this should error _ = assert_type( bot.wait_for(Event.slash_command), Coroutine[Any, Any, disnake.ApplicationCommandInteraction],