##// END OF EJS Templates
Simplify StreamCapturer for subprocess testing...
Simplify StreamCapturer for subprocess testing Rather than using a transient pipe for each subprocess started, the StreamCapturer now makes a single pipe, and subprocesses redirect their output to it. So long as this works on Windows (I've done brief testing, and os.pipe() seems to be functional), this will hopefully make this much more robust. The recent failures in ShiningPanda on IPython.parallel have been caused by StreamCapturer.

File last commit:

r13278:0ab30694
r13405:4ad2c011
Show More
merge_cells.js
37 lines | 1.2 KiB | application/javascript | JavascriptLexer
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 //
// Test merging two notebook cells.
//
Paul Ivanov
pep8 style function names
r13275 casper.notebook_test(function() {
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 var output = this.evaluate(function () {
// Fill in test data.
var set_cell_text = function () {
var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
IPython.notebook.insert_cell_below('code');
var cell_two = IPython.notebook.get_selected_cell();
Thomas Kluyver
Use Python 3 compatible syntax in tests
r13278 cell_two.set_text('print(a)');
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 };
// merge_cell_above()
set_cell_text();
IPython.notebook.merge_cell_above();
var merged_above = IPython.notebook.get_selected_cell();
// merge_cell_below()
set_cell_text();
IPython.notebook.select(0);
IPython.notebook.merge_cell_below();
var merged_below = IPython.notebook.get_selected_cell();
return {
above: merged_above.get_text(),
below: merged_below.get_text()
};
});
Thomas Kluyver
Use Python 3 compatible syntax in tests
r13278 this.test.assertEquals(output.above, 'a = 5\nprint(a)',
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 'Successful insert_cell_above().');
Thomas Kluyver
Use Python 3 compatible syntax in tests
r13278 this.test.assertEquals(output.below, 'a = 5\nprint(a)',
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 'Successful insert_cell_below().');
});