Title: test_curses not run with 'make test'
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3
Status: closed Resolution: duplicate
Dependencies: Superseder: test_curses skipped on buildbots
View: 12669
Assigned To: Nosy List: ned.deily, r.david.murray, ronaldoussoren
Priority: normal Keywords:

Created on 2012-08-15 10:31 by ronaldoussoren, last changed 2012-08-15 20:23 by nadeem.vawda. This issue is now closed.

Messages (7)
msg168272 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-08-15 10:31
I noticed that 'test_curses' is not started when performing "make test" on an OSX box:

[ 42/369] test_curses
test_curses skipped -- sys.__stdout__ is not a tty

The host is a machine running OSX 10.8, fully up-to-date with patches and the current version of Xcode. 

The same thing happens when starting the testrunning in the same way as used by the test target in the Makefile:

$ ./python.exe -W default -bb -E -R -m test -r -w -j 0 -u all,-largefile,-audio,-gui test_curses
Using random seed 9471227
[1/1] test_curses
test_curses skipped -- sys.__stdout__ is not a tty
1 test skipped:
Those skips are all expected on darwin.
msg168274 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-08-15 10:45
This appears to be the same issue as raised in Issue12669.  Apparently it is not fixed.
msg168276 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-08-15 10:52
the test does get run with 'make buildbottest', and then fails with a ValueError exception:

$ /Users/ronald/Projects/python/rw/default/tbuild/python.exe -W default -bb -E -R -m test -r -w -j 1 -u all -W --timeout=3600 test_curses
Using random seed 2242495
[1/1] test_curses
test test_curses crashed -- Traceback (most recent call last):
  File "/Users/ronald/Projects/python/rw/default/Lib/test/", line 1221, in runtest_inner
  File "/Users/ronald/Projects/python/rw/default/Lib/test/", line 338, in test_main
  File "/Users/ronald/Projects/python/rw/default/Lib/test/", line 324, in main
  File "/Users/ronald/Projects/python/rw/default/Lib/test/", line 283, in test_unget_wch
    read = chr(read)
ValueError: chr() arg not in range(0x110000)

That might be a bug in libcurses on OSX, I haven't tested with a separate install of libcurses yet.

BTW. The patch mentioned in Issue12669 looks slightly bogus: as buildbot is a daemon it might not even have a controlling tty. With some luck a proper fix will require the explicit use of a pseudo-tty.
msg168278 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-08-15 11:02
The "chr() arg not in range(0x110000)" from test_unget_wch is due to a bug in ncurses < 5.8; see Issue15037.
msg168279 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-08-15 11:20
I knew the test failure looked familiar, but couldn't find the issue in the tracker.

This issue (test_curses not running with make test) is due to '-j0' in the arguments to the test runner: with -j0 the runner uses multiprocessing and the stdout and stderr of the child processes are pipes, hence both sys.stdout and sys.__stdout__ are not tty's and the test isn't started.
msg168287 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-08-15 12:42
So this should be closed as a duplicate of issue 12669?
msg168288 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-08-15 12:59

I'll add a message to that issue to note that is also affects 'make test'
Date User Action Args
2012-08-15 20:23:39nadeem.vawdasetsuperseder: test_curses skipped on buildbots
2012-08-15 12:59:46ronaldoussorensetstatus: open -> closed
type: behavior
messages: + msg168288

resolution: duplicate
stage: resolved
2012-08-15 12:42:55r.david.murraysetnosy: + r.david.murray
messages: + msg168287
2012-08-15 11:20:59ronaldoussorensetmessages: + msg168279
2012-08-15 11:02:53ned.deilysetmessages: + msg168278
2012-08-15 10:52:42ronaldoussorensetmessages: + msg168276
2012-08-15 10:45:02ned.deilysetnosy: + ned.deily
messages: + msg168274
2012-08-15 10:31:19ronaldoussorencreate