Skip to content

Commit

Permalink
msg_type is part of the message header, not top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Nov 6, 2018
1 parent 6efb932 commit 8233daa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions notebook/tests/notebook/display_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ casper.notebook_test(function () {
cell.execute();
var kernel = IPython.notebook.kernel;
var msg_id = cell.last_msg_id;
var callback_id = 'mycallbackid'
var callback_id = 'mycallbackid';
cell.iopub_messages = [];
var add_msg = function(msg) {
msg.content.output_type = msg.msg_type;
msg.content.output_type = msg.header.msg_type;
cell.iopub_messages.push(msg.content);
};
kernel.set_callbacks_for_msg(callback_id, {
Expand Down
8 changes: 4 additions & 4 deletions notebook/tests/notebook/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ casper.notebook_test(function () {
cell.execute();
var kernel = IPython.notebook.kernel;
var msg_id = cell.last_msg_id;
var callback_id = 'mycallbackid'
var callback_id = 'mycallbackid';
cell.iopub_messages = [];
var add_msg = function(msg) {
if (msg.content.text==="remove handler\n") {
kernel.output_callback_overrides_pop(msg_id);
}
msg.content.output_type = msg.msg_type;
msg.content.output_type = msg.header.msg_type;
cell.iopub_messages.push(msg.content);
};
kernel.set_callbacks_for_msg(callback_id, {
Expand Down Expand Up @@ -221,10 +221,10 @@ casper.notebook_test(function () {
cell.execute();
var kernel = IPython.notebook.kernel;
var msg_id = cell.last_msg_id;
var callback_id = 'mycallbackid2'
var callback_id = 'mycallbackid2';
cell.iopub_messages = [];
var add_msg = function(msg) {
msg.content.output_type = msg.msg_type;
msg.content.output_type = msg.header.msg_type;
cell.iopub_messages.push(msg.content);
};
kernel.set_callbacks_for_msg(callback_id, {
Expand Down
4 changes: 2 additions & 2 deletions notebook/tests/services/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ casper.notebook_test(function () {
var kernel_info_response = this.evaluate(function(){
return IPython._kernel_info_response;
});
this.test.assertTrue( kernel_info_response.msg_type === 'kernel_info_reply', 'Kernel info request return kernel_info_reply');
this.test.assertTrue( kernel_info_response.content !== undefined, 'Kernel_info_reply is not undefined');
this.test.assertEquals( kernel_info_response.header.msg_type, 'kernel_info_reply', 'Kernel info request return kernel_info_reply');
this.test.assertNotEquals( kernel_info_response.content, undefined, 'Kernel_info_reply is not undefined');
});

// test kill
Expand Down

0 comments on commit 8233daa

Please sign in to comment.