Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsolatedAsyncioTestCase calls _setupAsyncioRunner even for skipped tests #96030

Closed
tiran opened this issue Aug 16, 2022 · 2 comments
Closed

IsolatedAsyncioTestCase calls _setupAsyncioRunner even for skipped tests #96030

tiran opened this issue Aug 16, 2022 · 2 comments
Labels
pending The issue will be closed if no feedback is provided tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@tiran
Copy link
Member

tiran commented Aug 16, 2022

Bug report

TestCase.run() is always executed, even for skipped tests. In fact the method checks for skipped and expected failure markers. The implementation of IsolatedAsyncioTestCase.run runs additional code around TestCase.run that does not obey the skipped marker. This was first discovered when GH-95736 broke tests on wasm32-emscripten. _setupAsyncioRunner should not be called if a test method or class is marked as skipped.

I have an easy fix for the issue.

@tiran tiran added the type-bug An unexpected behavior, bug, or error label Aug 16, 2022
@AlexWaygood AlexWaygood added tests Tests in the Lib/test dir topic-asyncio labels Aug 16, 2022
tiran added a commit to tiran/cpython that referenced this issue Aug 16, 2022
tiran added a commit to tiran/cpython that referenced this issue Aug 16, 2022
@gvanrossum
Copy link
Member

Maybe #96033 was meant to fix this too?

@gvanrossum gvanrossum changed the title IsolatedAsyncioTestCase sets up asyncio runner for skipped tests IsolatedAsyncioTestCase calls _setupAsyncioRunner even for skipped tests Aug 16, 2022
@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Oct 30, 2022

AFAIK this is already fixed by #96033.

@kumaraditya303 kumaraditya303 added the pending The issue will be closed if no feedback is provided label Oct 30, 2022
@ezio-melotti ezio-melotti moved this to Todo in asyncio Oct 30, 2022
Repository owner moved this from Todo to Done in asyncio Oct 30, 2022
Repository owner moved this from Todo to Done in Unittest issues Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending The issue will be closed if no feedback is provided tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Status: Done
Development

No branches or pull requests

4 participants