Permalink
Browse files

Disable the pager for the test suite.

Should fix gh-949
  • Loading branch information...
1 parent 0021257 commit 96c843ea9eb44d31c9e07521d6030e512a89cbc5 @takluyver committed Nov 1, 2011
Showing with 9 additions and 0 deletions.
  1. +1 −0 IPython/core/tests/test_page.py
  2. +8 −0 IPython/testing/globalipapp.py
@@ -7,6 +7,7 @@
#-----------------------------------------------------------------------------
import io
+# N.B. For the test suite, page.page is overridden (see IPython.testing.globalipapp)
from IPython.core import page
def test_detect_screen_size():
@@ -27,6 +27,7 @@
# our own
from . import tools
+from IPython.core import page
from IPython.utils import io
from IPython.utils import py3compat
from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
@@ -228,5 +229,12 @@ def start_ipython():
# To avoid extra IPython messages during testing, suppress io.stdout/stderr
io.stdout = StreamProxy('stdout')
io.stderr = StreamProxy('stderr')
+
+ # Override paging, so we don't require user interaction during the tests.
+ def nopage(strng, start=0, screen_lines=0, pager_cmd=None):
+ print(strng)
+
+ page.orig_page = page.page
+ page.page = nopage
return _ip

0 comments on commit 96c843e

Please sign in to comment.