Skip to content

Commit

Permalink
chore: stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Apr 28, 2023
1 parent d896193 commit cf276c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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],
Expand Down

0 comments on commit cf276c7

Please sign in to comment.