##// END OF EJS Templates
Python 2.6 doesn't support `python -m IPython`...
MinRK -
Show More
@@ -20,7 +20,6 b' from nose import SkipTest'
20 20
21 21 from IPython.testing import decorators as dec
22 22 from IPython.utils import py3compat
23 from IPython.utils.process import find_cmd
24 23
25 24 #-----------------------------------------------------------------------------
26 25 # Test functions begin
@@ -31,7 +30,19 b' def test_console_starts():'
31 30 """test that `ipython console` starts a terminal"""
32 31 from IPython.external import pexpect
33 32
34 p = pexpect.spawn(sys.executable, args=['-m', 'IPython', 'console', '--colors=NoColor'])
33 args = ['console', '--colors=NoColor']
34 # FIXME: remove workaround for 2.6 support
35 if sys.version_info[:2] > (2,6):
36 args = ['-m', 'IPython'] + args
37 cmd = sys.executable
38 else:
39 cmd = 'ipython'
40
41 try:
42 p = pexpect.spawn(cmd, args=args)
43 except IOError:
44 raise SkipTest("Couldn't find command %s" % cmd)
45
35 46 idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=15)
36 47 nt.assert_equal(idx, 0, "expected in prompt")
37 48 p.sendline('5')
@@ -188,7 +188,11 b' def ipexec(fname, options=None):'
188 188 _ip = get_ipython()
189 189 test_dir = os.path.dirname(__file__)
190 190
191 ipython_cmd = pipes.quote(sys.executable) + " -m IPython"
191 # FIXME: remove workaround for 2.6 support
192 if sys.version_info[:2] > (2,6):
193 ipython_cmd = pipes.quote(sys.executable) + " -m IPython"
194 else:
195 ipython_cmd = "ipython"
192 196 # Absolute path for filename
193 197 full_fname = os.path.join(test_dir, fname)
194 198 full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname)
General Comments 0
You need to be logged in to leave comments. Login now