##// END OF EJS Templates
Follow Fernando's suggestions.
Thomas Kluyver -
Show More
@@ -69,6 +69,11 b' def page_dumb(strng, start=0, screen_lines=25):'
69 69 print >>io.stdout, last_escape + os.linesep.join(screens[-1])
70 70
71 71 def _detect_screen_size(use_curses, screen_lines_def):
72 """Attempt to work out the number of lines on the screen.
73
74 This is called by page(). It can raise an error (e.g. when run in the
75 test suite), so it's separated out so it can easily be called in a try block.
76 """
72 77 if (TERM=='xterm' or TERM=='xterm-color') and sys.platform != 'sunos5':
73 78 local_use_curses = use_curses
74 79 else:
@@ -325,6 +325,7 b' def check_pairs(func, pairs):'
325 325 out = func(inp)
326 326 assert out == expected, pair_fail_msg.format(name, inp, expected, out)
327 327
328
328 329 if py3compat.PY3:
329 330 MyStringIO = StringIO
330 331 else:
@@ -337,6 +338,7 b' else:'
337 338
338 339 notprinted_msg = """Did not find {0!r} in printed output (on {1}):
339 340 {2!r}"""
341
340 342 class AssertPrints(object):
341 343 """Context manager for testing that code prints certain text.
342 344
General Comments 0
You need to be logged in to leave comments. Login now