[Python-checkins] r82987 - python/branches/py3k-cdecimal/Lib/test/test_curses.py
stefan.krah
python-checkins at python.org
Tue Jul 20 12:08:40 CEST 2010
Author: stefan.krah
Date: Tue Jul 20 12:08:40 2010
New Revision: 82987
Log:
Skip issue 8433
Modified:
python/branches/py3k-cdecimal/Lib/test/test_curses.py
Modified: python/branches/py3k-cdecimal/Lib/test/test_curses.py
==============================================================================
--- python/branches/py3k-cdecimal/Lib/test/test_curses.py (original)
+++ python/branches/py3k-cdecimal/Lib/test/test_curses.py Tue Jul 20 12:08:40 2010
@@ -16,13 +16,14 @@
# option. If not available, nothing after this line will be executed.
import unittest
-from test.support import requires, import_module
+from test.support import requires, import_module, verbose
requires('curses')
# If either of these don't exist, skip the tests.
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(10000)
+ 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())
@@ -274,6 +279,8 @@
test_issue6243(stdscr)
finally:
curses.resetty()
+ if HAVE_ISSUE_8433:
+ raise unittest.SkipTest("test getmouse() skipped: see issue 8433")
def test_main():
if not sys.stdout.isatty():
More information about the Python-checkins
mailing list