classification
Title: use support.captured_stdx context managers - test_asyncore
Type: Stage: resolved
Components: Tests Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: diana, ezio.melotti, josiahcarlson, python-dev, stutzbach, terry.reedy, vstinner
Priority: normal Keywords: patch

Created on 2014-05-26 14:59 by diana, last changed 2014-06-27 20:49 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
use_support_captured_test_asyncore.patch diana, 2014-05-26 14:59 review
Messages (6)
msg219162 - (view) Author: diana (diana) * Date: 2014-05-26 14:59
Updated test_asyncore to use the support.catpured_stdout/stderr context managers rather than try/finally blocks.
msg219415 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-05-30 19:10
Since asyncore is depracated, I don't know if tests are being updated, or if this should be closed.
msg219457 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-05-31 16:14
The patch includes two sets of changes:
1) uses support.captured_stderr() where appropriate;
2) removes some "from" import and uses support.x instead;

The former looks OK to me and could be applied, the latter doesn't look very useful.
msg219459 - (view) Author: diana (diana) * Date: 2014-05-31 16:25
I removed some of the "from" imports and used support.x instead for consistency. "support" was already being imported, and many of the things imported from "support" were already using support.x. I just made them all the same.
msg221725 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-27 20:48
New changeset c2dba8ee4e96 by Victor Stinner in branch '3.4':
Closes #21582: Cleanup test_asyncore. Patch written by diana.
http://hg.python.org/cpython/rev/c2dba8ee4e96

New changeset f1cd0aa1561a by Victor Stinner in branch 'default':
(Merge 3.4) Closes #21582: Cleanup test_asyncore. Patch written by diana.
http://hg.python.org/cpython/rev/f1cd0aa1561a
msg221726 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-06-27 20:49
The patch is simple, safe, and makes the test code cleaner. I commited your patch diana, thanks.
History
Date User Action Args
2014-06-27 20:49:41vstinnersetnosy: + vstinner
messages: + msg221726
2014-06-27 20:48:53python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg221725

resolution: fixed
stage: resolved
2014-05-31 16:25:32dianasetmessages: + msg219459
2014-05-31 16:14:31ezio.melottisetnosy: + ezio.melotti
messages: + msg219457
2014-05-30 19:10:08terry.reedysetnosy: + stutzbach, terry.reedy, josiahcarlson

messages: + msg219415
title: use support.catpured context managers - test_asyncore -> use support.captured_stdx context managers - test_asyncore
2014-05-26 15:01:11dianasettitle: use the support.catpured_stdout/stderr context managers - test_asyncore -> use support.catpured context managers - test_asyncore
2014-05-26 14:59:46dianacreate