##// END OF EJS Templates
Shut down kernels in parallel...
Shut down kernels in parallel When stopping the notebook server, it currently sends a shutdown request to each kernel and then waits for the process to finish. This can be slow if you have several kernels running. This makes it issues all the shutdown requests before waiting on the processes, so shutdown happens in parallel. KernelManager (and MultiKernelManager) gain three new public API methods to allow this: * request_shutdown (promoted from a private method) * wait_shutdown (refactored out of shutdown_kernel) * cleanup (refactored out of shutdown_kernel)

File last commit:

r16344:5566a760
r16510:633371e5
Show More
widget_string.js
53 lines | 2.3 KiB | application/javascript | JavascriptLexer
// Test widget string class
casper.notebook_test(function () {
index = this.append_cell(
'from IPython.html import widgets\n' +
'from IPython.display import display, clear_output\n' +
'print("Success")');
this.execute_cell_then(index);
var string_index = this.append_cell(
'string_widget = [widgets.TextWidget(value = "xyz", placeholder = "abc"),\n' +
' widgets.TextareaWidget(value = "xyz", placeholder = "def"),\n' +
' widgets.HTMLWidget(value = "xyz"),\n' +
' widgets.LatexWidget(value = "$\\\\LaTeX{}$")]\n' +
'[display(widget) for widget in string_widget]\n'+
'print("Success")');
this.execute_cell_then(string_index, function(index){
this.test.assertEquals(this.get_output_cell(index).text, 'Success\n',
'Create string widget cell executed with correct output.');
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea'),
'Widget subarea exists.');
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea .widget-hbox-single input[type=text]'),
'Textbox exists.');
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea .widget-hbox textarea'),
'Textarea exists.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox textarea', 'val')=='xyz',
'Python set textarea value.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox-single input[type=text]', 'val')=='xyz',
'Python set textbox value.');
this.test.assert(this.cell_element_exists(string_index,
'.widget-area .widget-subarea div span.MathJax_Preview'),
'MathJax parsed the LaTeX successfully.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox textarea', 'attr', ['placeholder'])=='def',
'Python set textarea placeholder.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox-single input[type=text]', 'attr', ['placeholder'])=='abc',
'Python set textbox placehoder.');
});
});