◐ Shell
clean mode source ↗

IsolatedAsyncioTestCase `__del__` could be dangerous

It looks like in IsolatedAsyncioTestCase when debug() crashes it doesn't teardown the event loop, in addition it seems that if the loop isn't torn down it will happen in __del__ which means thread local sensitive functions like set_event_loop get called via the GC from potentially the wrong thread

Originally posted by @graingert in #95898 (comment)