Issue 45238: Fix debug() in IsolatedAsyncioTestCase
Created on 2021-09-18 13:54 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 28449 | merged | serhiy.storchaka, 2021-09-18 14:00 | |
| PR 28521 | merged | lukasz.langa, 2021-09-22 16:10 | |
| PR 28522 | merged | lukasz.langa, 2021-09-22 16:19 | |
| Messages (6) | |||
|---|---|---|---|
| msg402132 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2021-09-18 13:54 | |
Currently debug() does not work in IsolatedAsyncioTestCase subclasses. It runs synchronous code (setUp(), tearDown(), synchronous tests and cleanup functions), but does not run any asynchronous code (asyncSetUp(), asyncTearDown(), asynchronous tests and cleanup functions) and produces warnings "RuntimeWarning: coroutine 'xxx' was never awaited". |
|||
| msg402149 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2021-09-19 10:03 | |
It turned out be more complicated than I expected. We need to keep the even loop after getting exception in debug() for having ability to run doCleanup() etc. The option is to close the even loop in __del__. But we should ensure that it is closed before running other event loop. Also, assertRaises() creates reference loops, so we cannot use it. |
|||
| msg402446 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2021-09-22 15:43 | |
New changeset ecb6922ff2d56476a6cfb0941ae55aca5e7fae3d by Serhiy Storchaka in branch 'main': bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449) https://github.com/python/cpython/commit/ecb6922ff2d56476a6cfb0941ae55aca5e7fae3d |
|||
| msg402454 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2021-09-22 16:42 | |
New changeset 44396aaba9b92b3a38a4b422a000d1a8eb05185a by Łukasz Langa in branch '3.10': [3.10] bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449) (GH-28521) https://github.com/python/cpython/commit/44396aaba9b92b3a38a4b422a000d1a8eb05185a |
|||
| msg402455 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2021-09-22 16:48 | |
New changeset e06b0fddf69b933fe82f60d78a0f6248ca36a0a3 by Łukasz Langa in branch '3.9': [3.9] bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449) (GH-28522) https://github.com/python/cpython/commit/e06b0fddf69b933fe82f60d78a0f6248ca36a0a3 |
|||
| msg402456 - (view) | Author: Łukasz Langa (lukasz.langa) * ![]() |
Date: 2021-09-22 16:57 | |
Thanks, Serhiy! ✨ 🍰 ✨ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:50 | admin | set | github: 89401 |
| 2021-09-22 16:57:42 | lukasz.langa | set | status: open -> closed resolution: fixed messages: + msg402456 stage: patch review -> resolved |
| 2021-09-22 16:48:40 | lukasz.langa | set | messages: + msg402455 |
| 2021-09-22 16:42:23 | lukasz.langa | set | messages: + msg402454 |
| 2021-09-22 16:19:28 | lukasz.langa | set | pull_requests: + pull_request26913 |
| 2021-09-22 16:10:49 | lukasz.langa | set | pull_requests: + pull_request26912 |
| 2021-09-22 15:43:30 | lukasz.langa | set | nosy:
+ lukasz.langa messages: + msg402446 |
| 2021-09-19 10:03:01 | serhiy.storchaka | set | messages: + msg402149 |
| 2021-09-18 14:00:18 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request26852 |
| 2021-09-18 13:54:37 | serhiy.storchaka | create | |
