Opened 7 years ago
Closed 7 years 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 |
Description
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.
https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertWarns
Change History (5)
comment:1 by , 7 years ago
Easy pickings: | set |
---|
comment:2 by , 7 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 7 years ago
Has patch: | set |
---|
Note:
See TracTickets
for help on using tickets.
PR