python / python/cpython

Create `unittest` assertRaises conventions for exception groups

Đang mở
#137,311 6 bình luận 1 reaction 1 người được giao Xem trên GitHub

@sobolevn đang làm issue này rồi.

Từ ngày 3/8/2025.

tests type-feature
Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.