mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
added test of IPython.version to js test suite
This commit is contained in:
parent
71d6a80629
commit
a54e50514d
21
IPython/html/tests/casperjs/test_cases/misc_tests.js
Normal file
21
IPython/html/tests/casperjs/test_cases/misc_tests.js
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
//
|
||||
// Miscellaneous javascript tests
|
||||
//
|
||||
casper.notebook_test(function () {
|
||||
var jsver = this.evaluate(function () {
|
||||
var cell = IPython.notebook.get_cell(0);
|
||||
cell.set_text('import IPython; print IPython.__version__');
|
||||
cell.execute();
|
||||
return IPython.version
|
||||
});
|
||||
|
||||
this.wait_for_output(0);
|
||||
|
||||
// refactor this into just a get_output(0)
|
||||
this.then(function () {
|
||||
var result = this.get_output_cell(0);
|
||||
this.test.assertEquals(result.text.trim(), jsver, 'IPython.version in JS matches IPython.');
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user