Skip to content

gh-155411: Fix test.support.subTests() for asynchronous tests - #155412

Open
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:subtests-async
Open

gh-155411: Fix test.support.subTests() for asynchronous tests#155412
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:subtests-async

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 9, 2026

Copy link
Copy Markdown
Member

An asynchronous test is now wrapped in an asynchronous function.

An asynchronous test was wrapped in a synchronous function, which
discarded the coroutine without awaiting it, so the test did not run at
all and was reported as successful.
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 9, 2026
Running an asyncio event loop needs a working socket, which is why
test_unittest.test_async_case skips the whole module without one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant