R. David Murray <rdmur...@bitdance.com> added the comment: In order for this to be actually useful, I think we also need a mechanism to set up and run async cleanup methods. In my own project I accomplish this by putting the run_until_complete in a try/finally loop and have an asyncAddCleanup method that just appends coroutines to a list that are then run in reversed order in the finally clause.
Whatever we come up with needs tests and docs, and before that, I'm sure, more discussion about the API. Probably a topic for python-ideas? Or the testing sig? I really do think we should have async test support in the stdlib, though. Basic support isn't that hard (it's 15 lines in the test suite I'm using currently). ---------- nosy: +r.david.murray type: behavior -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32972> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com