From 16a751c4d6faeb765c0e809a6545ff5e370f1487 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 13 Jan 2017 13:19:33 +0100 Subject: [PATCH] fix attachments test Don't try to pass non-JSONable data across evaluate boundary --- notebook/tests/notebook/attachments.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notebook/tests/notebook/attachments.js b/notebook/tests/notebook/attachments.js index 63029a680..a3be1ee5b 100644 --- a/notebook/tests/notebook/attachments.js +++ b/notebook/tests/notebook/attachments.js @@ -88,15 +88,15 @@ casper.notebook_test(function () { // check that the new cell has attachments this.then(function() { - var cell = this.evaluate(function() { - return IPython.notebook.get_selected_cell(); + var cell_attachments = this.evaluate(function() { + return IPython.notebook.get_selected_cell().attachments; }); - var orig_cell = this.evaluate(function() { - return IPython.notebook.get_cell(0); + var orig_cell_attachments = this.evaluate(function() { + return IPython.notebook.get_cell(0).attachments; }); var clip = this.evaluate(function() { return IPython.notebook.clipboard_attachments; }); // Check that the two cells have the same attachments - this.test.assertEquals(cell.attachments, orig_cell.attachments, + this.test.assertEquals(cell_attachments, orig_cell_attachments, "both cells have the attachments"); });