##// END OF EJS Templates
use test.begin to give test group a name
Paul Ivanov -
Show More
@@ -1,25 +1,27 b''
1 //
1 //
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", 2, function(test) {
5 this.test.begin("shutdown tests (notebook)", 2, function(test) {
6 casper.evaluate(function () {
6
7 casper.thenEvaluate(function () {
7 $('#kill_and_exit').click();
8 $('#kill_and_exit').click();
8 });
9 });
9
10
10 casper.thenEvaluate(function () {
11 casper.thenEvaluate(function () {
11 var cell = IPython.notebook.get_cell(0);
12 var cell = IPython.notebook.get_cell(0);
12 cell.set_text('a=10; print(a)');
13 cell.set_text('a=10; print(a)');
13 cell.execute();
14 cell.execute();
14 });
15 });
15
16
16 // refactor this into just a get_output(0)
17 // refactor this into just a get_output(0)
17 casper.then(function () {
18 casper.then(function () {
18 var result = this.get_output_cell(0);
19 var result = this.get_output_cell(0);
19 test.assertFalsy(result, "after shutdown: no execution results");
20 test.assertFalsy(result, "after shutdown: no execution results");
20 test.assertNot(this.kernel_running(),
21 test.assertNot(this.kernel_running(),
21 'after shutdown: IPython.notebook.kernel is false ');
22 'after shutdown: IPython.notebook.kernel.running is false ');
22 });
23 });
23 });
24
24
25 });
25 });
26 });
27
General Comments 0
You need to be logged in to leave comments. Login now