Skip to content
This repository

Disable the pager for the test suite #961

Closed
wants to merge 1 commit into from

2 participants

Thomas Kluyver Min RK
Thomas Kluyver
Collaborator

Should fix #949

@fperez: Can you check this? I can't replicate the issue at the moment.

Min RK
Owner

Thanks, fixes the issue for me.

Thomas Kluyver
Collaborator

Thanks, Min. I'll merge this tomorrow unless anyone objects (or beats me to it).

Min RK
Owner

I'll go ahead and merge, as it's pretty problematic that we can't run the test suite right now, and this seems clean.

Thomas Kluyver
Collaborator
Thomas Kluyver takluyver closed this in 71b3a3d November 02, 2011
Brian E. Granger ellisonbg referenced this pull request from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 01, 2011
Thomas Kluyver Disable the pager for the test suite.
Should fix gh-949
96c843e
This page is out of date. Refresh to see the latest.
1  IPython/core/tests/test_page.py
@@ -7,6 +7,7 @@
7 7
 #-----------------------------------------------------------------------------
8 8
 import io
9 9
 
  10
+# N.B. For the test suite, page.page is overridden (see IPython.testing.globalipapp)
10 11
 from IPython.core import page
11 12
 
12 13
 def test_detect_screen_size():
8  IPython/testing/globalipapp.py
@@ -27,6 +27,7 @@
27 27
 # our own
28 28
 from . import tools
29 29
 
  30
+from IPython.core import page
30 31
 from IPython.utils import io
31 32
 from IPython.utils import py3compat
32 33
 from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
@@ -228,5 +229,12 @@ def start_ipython():
228 229
     # To avoid extra IPython messages during testing, suppress io.stdout/stderr
229 230
     io.stdout = StreamProxy('stdout')
230 231
     io.stderr = StreamProxy('stderr')
  232
+    
  233
+    # Override paging, so we don't require user interaction during the tests.
  234
+    def nopage(strng, start=0, screen_lines=0, pager_cmd=None):
  235
+        print(strng)
  236
+    
  237
+    page.orig_page = page.page
  238
+    page.page = nopage
231 239
 
232 240
     return _ip
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.