Message 415527 - Python tracker

Message415527

Author asvetlov
Recipients asvetlov, yselivanov
Date 2022-03-18.20:44:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647636282.37.0.43859483152.issue47062@roundup.psfhosted.org>
In-reply-to
Content
Sometimes asyncio.run() is not enough.

For example, unittest test case needs to call several async functions (setup, test, teardown) from the synchronous code using the same execution context and event loop.

The proposal provides the following:

with Runner() as runner:
  runner.run(async_func())
History
Date User Action Args
2022-03-18 20:44:42asvetlovsetrecipients: + asvetlov, yselivanov
2022-03-18 20:44:42asvetlovsetmessageid: <1647636282.37.0.43859483152.issue47062@roundup.psfhosted.org>
2022-03-18 20:44:42asvetlovlinkissue47062 messages
2022-03-18 20:44:42asvetlovcreate