[Python-checkins] r76081 - in python/branches/release26-maint: Lib/test/test_curses.py

r.david.murray python-checkins at python.org
Tue Nov 3 15:31:54 CET 2009


Author: r.david.murray
Date: Tue Nov  3 15:31:53 2009
New Revision: 76081

Log:
It turns out test_curses can fail in a 2.6 buildbot because stdout is not
a tty in certain cases.

Merged revisions 75518 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75518 | r.david.murray | 2009-10-19 12:01:28 -0400 (Mon, 19 Oct 2009) | 3 lines
  
  Only run test_curses when sys.__stdout__ is a tty.  This eliminates the
  last false positive when running regrtest with -j.
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/test/test_curses.py

Modified: python/branches/release26-maint/Lib/test/test_curses.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_curses.py	(original)
+++ python/branches/release26-maint/Lib/test/test_curses.py	Tue Nov  3 15:31:53 2009
@@ -269,6 +269,8 @@
     curses.wrapper(main)
     unit_tests()
 else:
+    if not sys.__stdout__.isatty():
+        raise unittest.SkipTest("sys.__stdout__ is not a tty")
     # testing setupterm() inside initscr/endwin
     # causes terminal breakage
     curses.setupterm(fd=sys.__stdout__.fileno())


More information about the Python-checkins mailing list