Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_curses fails on 3.1 when run under regrtest #51345

Closed
bitdancer opened this issue Oct 10, 2009 · 5 comments
Closed

test_curses fails on 3.1 when run under regrtest #51345

bitdancer opened this issue Oct 10, 2009 · 5 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@bitdancer
Copy link
Member

BPO 7096
Nosy @pitrou, @avassalotti, @bitdancer, @skrah, @sandrotosi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-10-19.22:25:18.381>
created_at = <Date 2009-10-10.02:53:52.658>
labels = ['type-bug', 'tests']
title = 'test_curses fails on 3.1 when run under regrtest'
updated_at = <Date 2010-10-19.22:25:18.380>
user = 'https://github.com/bitdancer'

bugs.python.org fields:

activity = <Date 2010-10-19.22:25:18.380>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2010-10-19.22:25:18.381>
closer = 'r.david.murray'
components = ['Tests']
creation = <Date 2009-10-10.02:53:52.658>
creator = 'r.david.murray'
dependencies = []
files = []
hgrepos = []
issue_num = 7096
keywords = []
message_count = 5.0
messages = ['93818', '109978', '110002', '110026', '119171']
nosy_count = 6.0
nosy_names = ['pitrou', 'alexandre.vassalotti', 'r.david.murray', 'skrah', 'sandro.tosi', 'BreamoreBoy']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue7096'
versions = ['Python 3.1']

@bitdancer
Copy link
Member Author

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.

@bitdancer bitdancer added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Oct 10, 2009
@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Jul 11, 2010

Have any comments been made that could be referenced here?

@skrah
Copy link
Mannequin

skrah mannequin commented Jul 11, 2010

David, was this fixed in r75702 by any chance? Currently the test is just
skipped in 3.1.

@bitdancer
Copy link
Member Author

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.

@sandrotosi
Copy link
Contributor

mh, 3 months and no taker, let's close it? :)

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants