mirror of https://github.com/python/cpython
In some environments (under screen, in a chroot) curses doesn't support
mouse events. This makes the test fail. Catch that case and don't run the tests. Should make the debian/ubuntu buildbots that run in a chroot work again. Will backport to release24-maint.
This commit is contained in:
parent
d9da722d85
commit
e94e3b440f
|
@ -204,11 +204,13 @@ def module_funcs(stdscr):
|
||||||
curses.has_key(13)
|
curses.has_key(13)
|
||||||
|
|
||||||
if hasattr(curses, 'getmouse'):
|
if hasattr(curses, 'getmouse'):
|
||||||
curses.mousemask(curses.BUTTON1_PRESSED)
|
(availmask, oldmask) = curses.mousemask(curses.BUTTON1_PRESSED)
|
||||||
curses.mouseinterval(10)
|
# availmask indicates that mouse stuff not available.
|
||||||
# just verify these don't cause errors
|
if availmask != 0:
|
||||||
m = curses.getmouse()
|
curses.mouseinterval(10)
|
||||||
curses.ungetmouse(*m)
|
# just verify these don't cause errors
|
||||||
|
m = curses.getmouse()
|
||||||
|
curses.ungetmouse(*m)
|
||||||
|
|
||||||
def unit_tests():
|
def unit_tests():
|
||||||
from curses import ascii
|
from curses import ascii
|
||||||
|
|
Loading…
Reference in New Issue