From 5366cef17dcfd4f99acac5f2fb02e234b271b806 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 21 Oct 2014 16:43:30 -0700 Subject: [PATCH] Fix an issue in the `kernel_running` function of the JS tests, This fix allows the JS test to be ran against a remote server with a higher than LAN latency. This bug in our testing framework was exposed when running `iptest js/widgets --url` against tmpnb. --- IPython/html/tests/util.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IPython/html/tests/util.js b/IPython/html/tests/util.js index 9e159a6d4..464751cae 100644 --- a/IPython/html/tests/util.js +++ b/IPython/html/tests/util.js @@ -58,7 +58,10 @@ casper.page_loaded = function() { casper.kernel_running = function() { // Return whether or not the kernel is running. return this.evaluate(function() { - return IPython.notebook.kernel.is_connected(); + return IPython && + IPython.notebook && + IPython.notebook.kernel && + IPython.notebook.kernel.is_connected(); }); };