Skip to content

Commit

Permalink
Fixing console tests with IPython 5.1 on ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Aug 17, 2016
1 parent 4b9c085 commit 6f673a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import threading
import os
from nose.tools import eq_
from _pydev_bundle.pydev_imports import StringIO, SimpleXMLRPCServer
from _pydev_bundle.pydev_imports import SimpleXMLRPCServer
from _pydev_bundle.pydev_localhost import get_localhost
from _pydev_bundle.pydev_console_utils import StdIn
import socket
from _pydev_bundle.pydev_ipython_console_011 import get_pydev_frontend
import time
from _pydevd_bundle import pydevd_io

try:
xrange
Expand Down Expand Up @@ -40,7 +41,7 @@ def redirect_stdout(self):
from IPython.utils import io

self.original_stdout = sys.stdout
sys.stdout = io.stdout = StringIO()
sys.stdout = io.stdout = pydevd_io.IOBuf()

def restore_stdout(self):
from IPython.utils import io
Expand Down
3 changes: 2 additions & 1 deletion plugins/org.python.pydev/pysrc/tests/test_pydevconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def test_console_requests(self):
try:
self.assertEqual(['input_request'], found) #IPython
except:
self.assertEqual([u'Out[5]:', u'50', u'input_request'], found) # IPython 5.1
self.assertEqual([u'50', u'input_request'], found[1:]) # IPython 5.1
self.assertTrue(found[0].startswith(u'Out'))

comps = interpreter.getCompletions('foo.', 'foo.')
self.assert_(
Expand Down

0 comments on commit 6f673a4

Please sign in to comment.