Skip to content

unittest: tearDown is not called if asyncSetUp fails #96139

Open
@serhiy-storchaka

Description

@serhiy-storchaka

In unittest.TestCase, tearDown() is always called if setUp() is successful. It is only not called when setUp() fails. In IsolatedAsyncioTestCase, which is a subclass of TestCase, tearDown() is not called if setUp() is successful, but asyncSetUp() fails. I think is a problem.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions