[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: 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 #26

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: test_support_check_no_resource_warning_2.patch LGTM, thanks. -- ___ Python tracker ___ ___ Python-bu

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Addressed Victor's comments. This pattern is not widely used. Usually only raising ResourceWarning is tested, but not non-raising. -- Added file: http://bugs.python.org/file41885/test_support_check_no_resource_warning_2.patch __

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Martin Panter
Martin Panter added the comment: I was about to suggest adding this to test.support as well. Patch looks good to me. -- nosy: +martin.panter ___ Python tracker ___ _

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: 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. -- ___ Python tracker

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: 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. -- components: