created a kernel_running method

This commit is contained in:
Paul Ivanov 2013-10-22 22:29:54 -07:00
parent 755565019d
commit e971d051ed

View File

@ -29,11 +29,14 @@ casper.open_new_notebook = function () {
// initially, the cells aren't created, so wait for them to appear
this.waitForSelector('.CodeMirror-code');
// and make sure the kernel has started
this.waitFor(function kernel_ready() {
return this.evaluate(function kernel_ready() {
this.waitFor( this.kernel_running );
};
// return whether or not the kernel is running
casper.kernel_running = function kernel_running() {
return this.evaluate(function kernel_running() {
return IPython.notebook.kernel.running;
});
});
};
// Shut down the current notebook's kernel.