[issue32992] unittest: Automatically run coroutines in a loop

2018-03-06 Thread Yury Selivanov
Yury Selivanov added the comment: This is a duplicate of issue 32972. Let's move the discussion there. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> unittest.TestCase coroutine support

[issue32992] unittest: Automatically run coroutines in a loop

2018-03-06 Thread Yury Selivanov
Yury Selivanov added the comment: I think the right approach would be to add an new base TestCase class: AsyncioTestCase. And you should use the `asyncio.run` function to run the coroutine. -- nosy: +yselivanov ___ Python

[issue32992] unittest: Automatically run coroutines in a loop

2018-03-06 Thread Petter S
Change by Petter S : -- keywords: +patch pull_requests: +5770 stage: -> patch review ___ Python tracker ___

[issue32992] unittest: Automatically run coroutines in a loop

2018-03-04 Thread Petter Strandmark
New submission from Petter Strandmark : I am wondering whether it would be useful for unittest.TestCase to automatically run test methods that are coroutines within the default asyncio loop. Example: class TestAsync(unittest.TestCase):