Show More
@@ -44,16 +44,16 b' def test_console_starts():' | |||||
44 | raise SkipTest("Could not determine ipython command") |
|
44 | raise SkipTest("Could not determine ipython command") | |
45 |
|
45 | |||
46 | p = pexpect.spawn(ipython_cmd, args=['console', '--colors=NoColor']) |
|
46 | p = pexpect.spawn(ipython_cmd, args=['console', '--colors=NoColor']) | |
47 |
idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout= |
|
47 | idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=15) | |
48 | nt.assert_equals(idx, 0, "expected in prompt") |
|
48 | nt.assert_equals(idx, 0, "expected in prompt") | |
49 | p.sendline('5') |
|
49 | p.sendline('5') | |
50 |
idx = p.expect([r'Out\[\d+\]: 5', pexpect.EOF], timeout= |
|
50 | idx = p.expect([r'Out\[\d+\]: 5', pexpect.EOF], timeout=5) | |
51 | nt.assert_equals(idx, 0, "expected out prompt") |
|
51 | nt.assert_equals(idx, 0, "expected out prompt") | |
52 |
idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout= |
|
52 | idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=5) | |
53 | nt.assert_equals(idx, 0, "expected second in prompt") |
|
53 | nt.assert_equals(idx, 0, "expected second in prompt") | |
54 | # send ctrl-D;ctrl-D to exit |
|
54 | # send ctrl-D;ctrl-D to exit | |
55 | p.sendeof() |
|
55 | p.sendeof() | |
56 | p.sendeof() |
|
56 | p.sendeof() | |
57 |
p.expect([pexpect.EOF, pexpect.TIMEOUT], timeout= |
|
57 | p.expect([pexpect.EOF, pexpect.TIMEOUT], timeout=5) | |
58 | if p.isalive(): |
|
58 | if p.isalive(): | |
59 | p.terminate() |
|
59 | p.terminate() |
General Comments 0
You need to be logged in to leave comments.
Login now