summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_curses.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r--Lib/test/test_curses.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 419d8fc..a4a45a7 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -173,7 +173,6 @@ def module_funcs(stdscr):
curses.qiflush()
curses.raw() ; curses.raw(1)
curses.setsyx(5,5)
- curses.setupterm(fd=sys.__stdout__.fileno())
curses.tigetflag('hc')
curses.tigetnum('co')
curses.tigetstr('cr')
@@ -239,12 +238,14 @@ def main(stdscr):
finally:
curses.resetty()
-
if __name__ == '__main__':
curses.wrapper(main)
unit_tests()
else:
try:
+ # testing setupterm() inside initscr/endwin
+ # causes terminal breakage
+ curses.setupterm(fd=sys.__stdout__.fileno())
stdscr = curses.initscr()
main(stdscr)
finally: