--- ../py3k/Lib/test/test_curses.py 2010-07-20 13:01:58.000000000 +0200 +++ Lib/test/test_curses.py 2010-07-20 13:00:47.000000000 +0200 @@ -23,6 +23,7 @@ curses = import_module('curses') curses.panel = import_module('curses.panel') +HAVE_ISSUE_8433 = False # XXX: if newterm was supported we could use it instead of initscr and not exit term = os.environ.get('TERM') @@ -215,13 +216,17 @@ curses.has_key(13) if hasattr(curses, 'getmouse'): + global HAVE_ISSUE_8433 (availmask, oldmask) = curses.mousemask(curses.BUTTON1_PRESSED) # availmask indicates that mouse stuff not available. if availmask != 0: curses.mouseinterval(10) # just verify these don't cause errors - m = curses.getmouse() - curses.ungetmouse(*m) + try: + m = curses.getmouse() + curses.ungetmouse(*m) + except curses.error: + HAVE_ISSUE_8433 = True if hasattr(curses, 'is_term_resized'): curses.is_term_resized(*stdscr.getmaxyx()) @@ -287,6 +292,8 @@ finally: curses.endwin() unit_tests() + if HAVE_ISSUE_8433: + raise unittest.SkipTest("test getmouse() skipped: see issue 8433") if __name__ == '__main__': curses.wrapper(main)