This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fornellas
Recipients asvetlov, fornellas, yselivanov
Date 2019-12-19.19:44:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576784699.03.0.850711294275.issue39101@roundup.psfhosted.org>
In-reply-to
Content
IsolatedAsyncioTestCase freezes whenever an exception that inherits from BaseException is raised:


import unittest
class TestHangsForever(unittest.IsolatedAsyncioTestCase):
    async def test_hangs_forever(self):
        raise BaseException("Hangs forever")
if __name__ == "__main__":
    import unittest
    unittest.main()

A kind of similar issue present on 3.7 was fixed on 3.8 here https://github.com/python/cpython/blob/3.8/Lib/asyncio/events.py#L84, where BaseExceptions would not be correctly handled by the event loop, this seems somewhat related.

I had a look at IsolatedAsyncioTestCase implementation, did not spot any obvious broken thing there, I could use some light here. Thanks.
History
Date User Action Args
2019-12-19 19:44:59fornellassetrecipients: + fornellas, asvetlov, yselivanov
2019-12-19 19:44:59fornellassetmessageid: <1576784699.03.0.850711294275.issue39101@roundup.psfhosted.org>
2019-12-19 19:44:59fornellaslinkissue39101 messages
2019-12-19 19:44:58fornellascreate