don't use test.begin

the PPA we use on Travis CI doesn't have CasperJS 1.1.0-DEV yet, so
we're better off not using it for now.
This commit is contained in:
Paul Ivanov 2013-10-23 11:49:43 -07:00
parent 4993ddd498
commit 26b5a76841

View File

@ -2,26 +2,30 @@
// Test shutdown of a kernel.
//
casper.notebook_test(function () {
this.test.begin("shutdown tests (notebook)", 2, function(test) {
// XXX: test.begin allows named sections but requires casperjs 1.1.0-DEV.
// We will put it back into place when the next version of casper is
// released. Following that, all instances of this.test can be changed
// to just test.
//this.test.begin("shutdown tests (notebook)", 2, function(test) {
casper.thenEvaluate(function () {
this.thenEvaluate(function () {
$('#kill_and_exit').click();
});
casper.thenEvaluate(function () {
this.thenEvaluate(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=10; print(a)');
cell.execute();
});
// refactor this into just a get_output(0)
casper.then(function () {
this.then(function () {
var result = this.get_output_cell(0);
test.assertFalsy(result, "after shutdown: no execution results");
test.assertNot(this.kernel_running(),
this.test.assertFalsy(result, "after shutdown: no execution results");
this.test.assertNot(this.kernel_running(),
'after shutdown: IPython.notebook.kernel.running is false ');
});
});
//}); // end of test.begin
});