Show More
@@ -33,6 +33,7 function assert_has(short_name, json, result, result2) { | |||||
33 | // for a set of mimetype keys, using their short names ('javascript', 'text', |
|
33 | // for a set of mimetype keys, using their short names ('javascript', 'text', | |
34 | // 'png', etc). |
|
34 | // 'png', etc). | |
35 | function check_output_area(output_type, keys) { |
|
35 | function check_output_area(output_type, keys) { | |
|
36 | this.wait_for_output(0); | |||
36 | json = this.evaluate(function() { |
|
37 | json = this.evaluate(function() { | |
37 | var json = IPython.notebook.get_cell(0).output_area.toJSON(); |
|
38 | var json = IPython.notebook.get_cell(0).output_area.toJSON(); | |
38 | // appended cell will initially be empty, lets add it some output |
|
39 | // appended cell will initially be empty, lets add it some output | |
@@ -102,7 +103,6 casper.notebook_test(function () { | |||||
102 | this.then(function() { |
|
103 | this.then(function() { | |
103 | clear_and_execute(this, |
|
104 | clear_and_execute(this, | |
104 | "x = %lsmagic\nfrom IPython.display import display; display(x)"); |
|
105 | "x = %lsmagic\nfrom IPython.display import display; display(x)"); | |
105 | this.execute_cell(0); |
|
|||
106 | }); |
|
106 | }); | |
107 |
|
107 | |||
108 | this.then(function ( ) { |
|
108 | this.then(function ( ) { | |
@@ -145,4 +145,22 casper.notebook_test(function () { | |||||
145 | check_output_area.apply(this, ['display_data', ['text', 'html']]); |
|
145 | check_output_area.apply(this, ['display_data', ['text', 'html']]); | |
146 | }); |
|
146 | }); | |
147 |
|
147 | |||
|
148 | ||||
|
149 | this.then(function() { | |||
|
150 | clear_and_execute(this, | |||
|
151 | "from IPython.display import Image; Image('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAWJLR0QA\\niAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCRQnOqNu0b4AAAAKSURBVAjXY2AA\\nAAACAAHiIbwzAAAAAElFTkSuQmCC')"); | |||
|
152 | }); | |||
|
153 | ||||
|
154 | this.then(function ( ) { | |||
|
155 | check_output_area.apply(this, ['pyout', ['text', 'png']]); | |||
|
156 | }); | |||
|
157 | ||||
|
158 | this.then(function() { | |||
|
159 | clear_and_execute(this, | |||
|
160 | "from IPython.display import Image, display; display(Image('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAWJLR0QA\\niAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCRQnOqNu0b4AAAAKSURBVAjXY2AA\\nAAACAAHiIbwzAAAAAElFTkSuQmCC'))"); | |||
|
161 | }); | |||
|
162 | ||||
|
163 | this.then(function ( ) { | |||
|
164 | check_output_area.apply(this, ['display_data', ['text', 'png']]); | |||
|
165 | }); | |||
148 | }); |
|
166 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now