Skip to content

Commit

Permalink
Disable the pager for the test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver authored and minrk committed Nov 2, 2011
1 parent 4d898be commit 77b0c8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions IPython/core/tests/test_page.py
Expand Up @@ -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():
Expand Down
8 changes: 8 additions & 0 deletions IPython/testing/globalipapp.py
Expand Up @@ -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
Expand Down Expand Up @@ -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 77b0c8a

Please sign in to comment.