Create `unittest` assertRaises conventions for exception groups
Offen
@sobolevn arbeitet bereits daran.
Seit 03.8.2025.
tests
type-feature
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.