You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dpy supports an optional flag on message send titled "delete_after".
In a standard test, this can cause the test to throw a task destruction warning and not clean up open asyncio tasks, as dpy is holding onto the future message delete event, as well as the associated firing of api events raw_message_delete and message_delete.
If delete_after is used in a command, dpytest or pytest does not wait for this event to fire and kills the event prematurely. Workaround solution is to insert 'await asyncio.sleep(x)' with x set to the length of the delete_after timer.
There could possibly be a feature that would automatically hold open the test until this event has completed instead of manually awaiting a sleep timer.
The text was updated successfully, but these errors were encountered:
Dpy supports an optional flag on message send titled "delete_after".
In a standard test, this can cause the test to throw a task destruction warning and not clean up open asyncio tasks, as dpy is holding onto the future message delete event, as well as the associated firing of api events raw_message_delete and message_delete.
If delete_after is used in a command, dpytest or pytest does not wait for this event to fire and kills the event prematurely. Workaround solution is to insert 'await asyncio.sleep(x)' with x set to the length of the delete_after timer.
There could possibly be a feature that would automatically hold open the test until this event has completed instead of manually awaiting a sleep timer.
The text was updated successfully, but these errors were encountered: