> How is a separate base class better? :)
It's very explicit that way.
Also, I personally subclassed TestCase in many of my projects specifically to add async support. To do that you have to use a metaclass to scan class' namespace for 'async def' functions.
Currently, unittest.TestCase doesn't have a metaclass. If you add one to it, it might break all packages that were subclassing TestCase with a metaclass.
> If you accidentally add `async` to the front of a test method in a TestCase-derived test class, you get mostly-silent success with an easily-ignored warning about a coroutine not being awaited.
Well, what if you use trio or curio? You add an 'async' keyword and get a cryptic error that some framework internals just broke.
So I'm strong -1 on the coroutine_runner attribute idea. |