Show More
@@ -43,16 +43,13 b' def test_console_starts():' | |||||
43 | except IOError: |
|
43 | except IOError: | |
44 | raise SkipTest("Couldn't find command %s" % cmd) |
|
44 | raise SkipTest("Couldn't find command %s" % cmd) | |
45 |
|
45 | |||
46 |
idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout= |
|
46 | idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=45) | |
47 | nt.assert_equal(idx, 0, "expected in prompt") |
|
|||
48 | p.sendline('5') |
|
47 | p.sendline('5') | |
49 | idx = p.expect([r'Out\[\d+\]: 5', pexpect.EOF], timeout=5) |
|
48 | idx = p.expect([r'Out\[\d+\]: 5', pexpect.EOF], timeout=15) | |
50 | nt.assert_equal(idx, 0, "expected out prompt") |
|
49 | idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=15) | |
51 | idx = p.expect([r'In \[\d+\]', pexpect.EOF], timeout=5) |
|
|||
52 | nt.assert_equal(idx, 0, "expected second in prompt") |
|
|||
53 | # send ctrl-D;ctrl-D to exit |
|
50 | # send ctrl-D;ctrl-D to exit | |
54 | p.sendeof() |
|
51 | p.sendeof() | |
55 | p.sendeof() |
|
52 | p.sendeof() | |
56 |
p.expect([pexpect.EOF, pexpect.TIMEOUT], timeout= |
|
53 | p.expect([pexpect.EOF, pexpect.TIMEOUT], timeout=30) | |
57 | if p.isalive(): |
|
54 | if p.isalive(): | |
58 | p.terminate() |
|
55 | p.terminate() |
General Comments 0
You need to be logged in to leave comments.
Login now