##// END OF EJS Templates
Separate get_session_info between HistoryAccessor and HistoryManager...
Separate get_session_info between HistoryAccessor and HistoryManager HistoryAccessor has no concept of the current session, whereas HistoryManager does. HistoryAccessor should therefore always be used with a session number > 0. However, I have added get_last_session_id() to HistoryAccessor to make it easier to work with recent history. Closes gh-5348

File last commit:

r15619:957ea4d8
r15979:326b5fcd
Show More
interrupt.js
44 lines | 1.2 KiB | application/javascript | JavascriptLexer
//
// Test kernel interrupt
//
casper.notebook_test(function () {
this.evaluate(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text(
'import time'+
'\nfor x in range(3):'+
'\n time.sleep(1)'
);
cell.execute();
});
this.wait_for_busy();
// interrupt using menu item (Kernel -> Interrupt)
this.thenClick('li#int_kernel');
this.wait_for_output(0);
this.then(function () {
var result = this.get_output_cell(0);
this.test.assertEquals(result.ename, 'KeyboardInterrupt', 'keyboard interrupt (mouseclick)');
});
// run cell 0 again, now interrupting using keyboard shortcut
this.thenEvaluate(function () {
cell.clear_output();
cell.execute();
});
// interrupt using Ctrl-M I keyboard shortcut
this.thenEvaluate( function() {
IPython.keyboard.trigger_keydown('i');
});
this.wait_for_output(0);
this.then(function () {
var result = this.get_output_cell(0);
this.test.assertEquals(result.ename, 'KeyboardInterrupt', 'keyboard interrupt (shortcut)');
});
});