This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年02月10日 10:14 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_support_check_no_resource_warning.patch | serhiy.storchaka, 2016年02月10日 10:14 | review | ||
| test_support_check_no_resource_warning_2.patch | serhiy.storchaka, 2016年02月10日 11:13 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg260000 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年02月10日 10:14 | |
Victor proposed in issue25994 to use special context manager to check that no ResourceWarning is emitted. I think that this helper can be useful in other tests. It saves 3 lines for every use. Proposed patch adds it in test.support. |
|||
| msg260001 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年02月10日 10:26 | |
Oh, I didn't expect that so many existing test already use the same pattern to check for ResourceWarning. Nice patch! I added a comment: we must be careful in the documentation of the helper. |
|||
| msg260002 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年02月10日 10:37 | |
I was about to suggest adding this to test.support as well. Patch looks good to me. |
|||
| msg260005 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年02月10日 11:13 | |
Addressed Victor's comments. This pattern is not widely used. Usually only raising ResourceWarning is tested, but not non-raising. |
|||
| msg260040 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年02月10日 21:56 | |
test_support_check_no_resource_warning_2.patch LGTM, thanks. |
|||
| msg260086 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年02月11日 11:12 | |
New changeset e9a4b30e3e43 by Serhiy Storchaka in branch '3.5': Issue #26325: Added test.support.check_no_resource_warning() to check that https://hg.python.org/cpython/rev/e9a4b30e3e43 New changeset faf676d8c054 by Serhiy Storchaka in branch 'default': Issue #26325: Added test.support.check_no_resource_warning() to check that https://hg.python.org/cpython/rev/faf676d8c054 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:27 | admin | set | github: 70513 |
| 2016年02月11日 11:38:28 | serhiy.storchaka | set | status: open -> closed assignee: serhiy.storchaka resolution: fixed stage: patch review -> resolved |
| 2016年02月11日 11:12:45 | python-dev | set | nosy:
+ python-dev messages: + msg260086 |
| 2016年02月10日 21:56:09 | vstinner | set | messages: + msg260040 |
| 2016年02月10日 11:13:40 | serhiy.storchaka | set | files:
+ test_support_check_no_resource_warning_2.patch messages: + msg260005 |
| 2016年02月10日 10:37:00 | martin.panter | set | nosy:
+ martin.panter messages: + msg260002 |
| 2016年02月10日 10:26:21 | vstinner | set | messages: + msg260001 |
| 2016年02月10日 10:15:17 | serhiy.storchaka | set | nosy:
+ vstinner |
| 2016年02月10日 10:14:02 | serhiy.storchaka | create | |