Opened 9 months ago

Closed 9 months ago

#29363 closed Cleanup/optimization (fixed)

Use unittest assertWarns methods instead of warnings.catch_warnings/simplefilter/assertions in the test suite.

Reported by: Simon Charette Owned by: Morgan Aubert
Component: Testing framework Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


The assertWarns and assertWarnsRegex method have been introduced in Python 3.2 and should remove a lot of boilerplate around warnings testing in the test suite.

Change History (5)

comment:1 Changed 9 months ago by Simon Charette

Easy pickings: set

comment:2 Changed 9 months ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 9 months ago by Morgan Aubert

Owner: changed from nobody to Morgan Aubert
Status: newassigned

comment:4 Changed 9 months ago by Morgan Aubert

Has patch: set

comment:5 Changed 9 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 704443ac:

Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage().

Note: See TracTickets for help on using tickets.
Back to Top