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.

Author nadeem.vawda
Recipients ezio.melotti, michael.foord, nadeem.vawda, pitrou, r.david.murray, vstinner
Date 2011-07-31.21:52:14
SpamBayes Score 9.572815e-11
Marked as misclassified No
Message-id <1312149135.76.0.0319517534091.issue12669@psf.upfronthosting.co.za>
In-reply-to
Content
When running regrtest with the -j and/or -w options, test_curses gets skipped,
complaining that stdout is not a tty. This means that the buildbots never run
this test, which is obviously a Bad Thing.

For the -w case (which applies to the buildbots), this is caused by sys.stdout
(and sys.stderr) being replaced with a StringIO instance. We can work around
this in the test by using sys.__stdout__ instead. This is perhaps ugly, but it
seems to work, and is much better than doing nothing. For the record, this has
already been proposed in issue7096 (now dead).

For the -j case things aren't quite so straightforward - each test is run in a
subprocess, with stdout and stderr redirected to pipes, so there isn't an easy
way to access the terminal the process is associated with. Off the top of my
head, the only way I can think of to work around this is to special-case
test_curses so that it runs in the main process, and I'd really much rather not
do that. Thankfully this case doesn't apply to the buildbots at present, but it
is still bothersome when running tests locally.

TLDR:
1. Is there any reason for test_curses not to use sys.__stdout__?
2. Any ideas on how to get test_curses working with regrtest.py -j?
History
Date User Action Args
2011-07-31 21:52:15nadeem.vawdasetrecipients: + nadeem.vawda, pitrou, vstinner, ezio.melotti, r.david.murray, michael.foord
2011-07-31 21:52:15nadeem.vawdasetmessageid: <1312149135.76.0.0319517534091.issue12669@psf.upfronthosting.co.za>
2011-07-31 21:52:15nadeem.vawdalinkissue12669 messages
2011-07-31 21:52:14nadeem.vawdacreate