Skip to content

unittest.IsolatedAsyncioTestCase hangs on asyncio.CancelledError #83887

Closed

Description

@AndreyMoiseev
BPO 39706
Nosy @asvetlov, @1st1, @lisroach
PRs
  • bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. #22654
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-10-26.16:28:53.559>
    created_at = <Date 2020-02-21.10:12:48.627>
    labels = ['type-bug', 'expert-asyncio']
    title = 'unittest.IsolatedAsyncioTestCase hangs on asyncio.CancelledError'
    updated_at = <Date 2020-10-26.16:28:53.558>
    user = 'https://bugs.python.org/AndreyMoiseev'

    bugs.python.org fields:

    activity = <Date 2020-10-26.16:28:53.558>
    actor = 'lisroach'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-10-26.16:28:53.559>
    closer = 'lisroach'
    components = ['asyncio']
    creation = <Date 2020-02-21.10:12:48.627>
    creator = 'Andrey Moiseev'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39706
    keywords = ['patch']
    message_count = 1.0
    messages = ['362402']
    nosy_count = 4.0
    nosy_names = ['asvetlov', 'yselivanov', 'lisroach', 'Andrey Moiseev']
    pr_nums = ['22654']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue39706'
    versions = []

    Activity

    1. AndreyMoiseev commented on Feb 21, 2020

      AndreyMoiseevmannequin
      MannequinAuthor

      The following code hangs:

      import asyncio
      import unittest
      
      
      class TestCancellation(unittest.IsolatedAsyncioTestCase):
      
          async def test_works(self):
              raise asyncio.CancelledError()
      
      
      if __name__ == '__main__':
          unittest.main()
    2. added
      type-bug
      on Feb 21, 2020
    3. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      topic-asynciotype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions