Show More
@@ -2,26 +2,30 b'' | |||||
2 | // Test shutdown of a kernel. |
|
2 | // Test shutdown of a kernel. | |
3 | // |
|
3 | // | |
4 | casper.notebook_test(function () { |
|
4 | casper.notebook_test(function () { | |
5 | this.test.begin("shutdown tests (notebook)", 2, function(test) { |
|
5 | // XXX: test.begin allows named sections but requires casperjs 1.1.0-DEV. | |
|
6 | // We will put it back into place when the next version of casper is | |||
|
7 | // released. Following that, all instances of this.test can be changed | |||
|
8 | // to just test. | |||
|
9 | //this.test.begin("shutdown tests (notebook)", 2, function(test) { | |||
6 |
|
10 | |||
7 |
|
|
11 | this.thenEvaluate(function () { | |
8 | $('#kill_and_exit').click(); |
|
12 | $('#kill_and_exit').click(); | |
9 | }); |
|
13 | }); | |
10 |
|
14 | |||
11 |
|
|
15 | this.thenEvaluate(function () { | |
12 | var cell = IPython.notebook.get_cell(0); |
|
16 | var cell = IPython.notebook.get_cell(0); | |
13 | cell.set_text('a=10; print(a)'); |
|
17 | cell.set_text('a=10; print(a)'); | |
14 | cell.execute(); |
|
18 | cell.execute(); | |
15 | }); |
|
19 | }); | |
16 |
|
20 | |||
17 | // refactor this into just a get_output(0) |
|
21 | // refactor this into just a get_output(0) | |
18 |
|
|
22 | this.then(function () { | |
19 | var result = this.get_output_cell(0); |
|
23 | var result = this.get_output_cell(0); | |
20 | test.assertFalsy(result, "after shutdown: no execution results"); |
|
24 | this.test.assertFalsy(result, "after shutdown: no execution results"); | |
21 | test.assertNot(this.kernel_running(), |
|
25 | this.test.assertNot(this.kernel_running(), | |
22 | 'after shutdown: IPython.notebook.kernel.running is false '); |
|
26 | 'after shutdown: IPython.notebook.kernel.running is false '); | |
23 | }); |
|
27 | }); | |
24 |
|
28 | |||
25 | }); |
|
29 | //}); // end of test.begin | |
26 | }); |
|
30 | }); | |
27 |
|
31 |
General Comments 0
You need to be logged in to leave comments.
Login now