From a0929ab8c1436f032e26a416c9cdf4479dadc436 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 27 Nov 2015 13:29:03 +0100 Subject: [PATCH 1/3] Timeout is an option of `waitFor`, not `then` --- notebook/tests/util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebook/tests/util.js b/notebook/tests/util.js index aa0d995a5..4f5eb18aa 100644 --- a/notebook/tests/util.js +++ b/notebook/tests/util.js @@ -166,11 +166,11 @@ casper.wait_for_output = function (cell_num, out_num) { }, // pass parameter from the test suite js to the browser code js {c : cell_num, o : out_num}); + }, + function then() { }, + function timeout() { + this.echo("wait_for_output timed out!"); }); - }, - function then() { }, - function timeout() { - this.echo("wait_for_output timed out!"); }); }; From c54b4f0e1d5eb1b64201155e4dec9e9884af5cc5 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 27 Nov 2015 13:46:04 +0100 Subject: [PATCH 2/3] more info on timeout --- notebook/tests/util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebook/tests/util.js b/notebook/tests/util.js index 4f5eb18aa..950cbcbc7 100644 --- a/notebook/tests/util.js +++ b/notebook/tests/util.js @@ -169,7 +169,11 @@ casper.wait_for_output = function (cell_num, out_num) { }, function then() { }, function timeout() { - this.echo("wait_for_output timed out!"); + this.echo("wait_for_output timed out on cell "+cell_num+", waiting for "+out_num+"outputs ."); + pn = this.evaluate(function get_prompt(c) { + return IPython.notebook.get_cell(c).input_prompt_number; + }); + this.echo("cell prompt was :'"+pn+"'.") }); }); }; From 259be440b51bd802d4d840bd19f22baf3a8da4cd Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sun, 29 Nov 2015 14:04:41 +0100 Subject: [PATCH 3/3] use var --- notebook/tests/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/tests/util.js b/notebook/tests/util.js index 950cbcbc7..8a15b1d56 100644 --- a/notebook/tests/util.js +++ b/notebook/tests/util.js @@ -170,7 +170,7 @@ casper.wait_for_output = function (cell_num, out_num) { function then() { }, function timeout() { this.echo("wait_for_output timed out on cell "+cell_num+", waiting for "+out_num+"outputs ."); - pn = this.evaluate(function get_prompt(c) { + var pn = this.evaluate(function get_prompt(c) { return IPython.notebook.get_cell(c).input_prompt_number; }); this.echo("cell prompt was :'"+pn+"'.")