Skip to content

Create unittest assertRaises conventions for exception groups #137311

@gpshead

Description

@gpshead

Feature or enhancement

Proposal:

unittest.TestCase has a variety of assertRaises flavor APIs. We need to better explain how to practically use these with exception groups and the ExceptionGroup type. Possibly add additional APIs to make them easier.

This is a tracking issue for the linked discussion in case people have PRs to propose.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/improve-support-for-exception-groups-in-unittest/100803

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-featureA feature request or enhancement

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions