cpython icon indicating copy to clipboard operation
cpython copied to clipboard

IsolatedAsyncioTestCase sets up asyncio runner for skipped tests

Open tiran opened this issue 3 years ago • 1 comments

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 avatar Aug 16 '22 17:08 tiran

Maybe #96033 was meant to fix this too?

gvanrossum avatar Aug 16 '22 21:08 gvanrossum

AFAIK this is already fixed by https://github.com/python/cpython/pull/96033.

kumaraditya303 avatar Oct 30 '22 08:10 kumaraditya303