New submission from R. David Murray <rdmur...@bitdance.com>: 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. ---------- components: Tests messages: 93818 nosy: alexandre.vassalotti, pitrou, r.david.murray priority: normal severity: normal stage: needs patch status: open title: test_curses fails on 3.1 when run under regrtest type: behavior versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7096> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com