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.

classification
Title: test_curses fails on 3.1 when run under regrtest
Type: behavior Stage: needs patch
Components: Tests Versions: Python 3.1
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, alexandre.vassalotti, pitrou, r.david.murray, sandro.tosi, skrah
Priority: normal Keywords:

Created on 2009-10-10 02:53 by r.david.murray, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg93818 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-10-10 02:53
test_curses currently fails on 3.1 when run under regrtest.  It passes
if run in verbose mode or standalone.  The cause turns out to be that
when not run in verbose mode regrtest substitutes an io.StringIO
instance for sys.stdout, and that object does not have a .fileno
attribute.  The line that fails is this:

curses.setupterm(fd=sys.stdout.fileno())

This test fails only on 3.1 for a couple of different reasons.  On trunk
and py3k, r73072 and the r73678 merge removed the regrtest check that
made sure the tests produced no output on stdout, and therefore it no
longer replaces stdout with a StringIO instance .  On 2.6, on the other
hand, the above line references sys.__stdout__.fileno() (presumably for
this very reason!)  r74181 was the commit that changed this to the above
on the py3k branch, citing it as the cause of regrtest "duplicating some
output".

It seems to me that not checking for output on stdout in regrtest is a
regression in the quality of the test runner.  It is also not clear to
me how test_curses writing to the real stdout would cause regrtest to
duplicate output.  So I'm putting the authors of the two patches
involved on the nosy list so they can comment.  FYI I reverted the
stdout change in test_curses and regrtest seems to run fine, so I'm not
sure what output was being duplicated.
msg109978 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-11 09:51
Have any comments been made that could be referenced here?
msg110002 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-07-11 13:05
David, was this fixed in r75702 by any chance? Currently the test is just
skipped in 3.1.
msg110026 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-11 16:30
This still fails for me in the same way if I uncomment the skip.  It works fine in py3k trunk, though, so unless someone wants to figure out what fix that wasn't backported fixed this, we could probably just close it as out of date.
msg119171 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2010-10-19 21:51
mh, 3 months and no taker, let's close it? :)
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51345
2010-10-19 22:25:18r.david.murraysetstatus: open -> closed
resolution: out of date
2010-10-19 21:51:36sandro.tosisetnosy: + sandro.tosi
messages: + msg119171
2010-07-11 16:30:43r.david.murraysetmessages: + msg110026
2010-07-11 13:05:07skrahsetnosy: + skrah
messages: + msg110002
2010-07-11 09:51:36BreamoreBoysetnosy: + BreamoreBoy
messages: + msg109978
2009-10-10 02:53:52r.david.murraycreate