Show More
@@ -1,28 +1,23 b'' | |||
|
1 | 1 | // |
|
2 | 2 | // Test kernel interrupt |
|
3 | 3 | // |
|
4 | 4 | casper.notebook_test(function () { |
|
5 | 5 | this.evaluate(function () { |
|
6 | 6 | var cell = IPython.notebook.get_cell(0); |
|
7 | 7 | cell.set_text('import time\nfor x in range(3):\n time.sleep(1)'); |
|
8 | 8 | cell.execute(); |
|
9 | 9 | }); |
|
10 | 10 | |
|
11 | 11 | this.thenClick('li#int_kernel'); |
|
12 | 12 | |
|
13 | this.waitFor(function () { | |
|
14 | return this.evaluate(function get_output() { | |
|
15 | var cell = IPython.notebook.get_cell(0); | |
|
16 | return cell.output_area.outputs.length != 0; | |
|
17 | }) | |
|
18 | }); | |
|
13 | this.wait_for_output(0); | |
|
19 | 14 | |
|
20 | 15 | this.then(function () { |
|
21 | 16 | var result = this.evaluate(function () { |
|
22 | 17 | var cell = IPython.notebook.get_cell(0); |
|
23 | 18 | var output = cell.output_area.outputs[0].ename; |
|
24 | 19 | return output; |
|
25 | 20 | }) |
|
26 | 21 | this.test.assertEquals(result, 'KeyboardInterrupt', 'keyboard interrupt') |
|
27 | 22 | }); |
|
28 | 23 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now