Show More
@@ -15,6 +15,9 b' mime = {' | |||||
15 | "javascript" : "application/javascript", |
|
15 | "javascript" : "application/javascript", | |
16 | }; |
|
16 | }; | |
17 |
|
17 | |||
|
18 | var black_dot_jpeg="\"\"\"/9j/4AAQSkZJRgABAQEASABIAAD/2wBDACodICUgGiolIiUvLSoyP2lEPzo6P4FcYUxpmYagnpaG\nk5GovfLNqLPltZGT0v/V5fr/////o8v///////L/////2wBDAS0vLz83P3xERHz/rpOu////////\n////////////////////////////////////////////////////////////wgARCAABAAEDAREA\nAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAABP/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEA\nAhADEAAAARn/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAEFAn//xAAUEQEAAAAAAAAAAAAA\nAAAAAAAA/9oACAEDAQE/AX//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AX//xAAUEAEA\nAAAAAAAAAAAAAAAAAAAA/9oACAEBAAY/An//xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAE/\nIX//2gAMAwEAAgADAAAAEB//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/EH//xAAUEQEA\nAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/EH//xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAE/\nEH//2Q==\"\"\""; | |||
|
19 | var black_dot_png = '\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAWJLR0QA\\niAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCRQnOqNu0b4AAAAKSURBVAjXY2AA\\nAAACAAHiIbwzAAAAAElFTkSuQmCC\"'; | |||
|
20 | ||||
18 | // helper function to ensure that the short_name is found in the toJSON |
|
21 | // helper function to ensure that the short_name is found in the toJSON | |
19 | // represetnation, while the original in-memory cell retains its long mimetype |
|
22 | // represetnation, while the original in-memory cell retains its long mimetype | |
20 | // name, and that fromJSON also gets its long mimetype name |
|
23 | // name, and that fromJSON also gets its long mimetype name | |
@@ -148,8 +151,9 b' casper.notebook_test(function () {' | |||||
148 |
|
151 | |||
149 | this.then(function() { |
|
152 | this.then(function() { | |
150 | clear_and_execute(this, |
|
153 | clear_and_execute(this, | |
151 | "from IPython.display import Image; Image('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAWJLR0QA\\niAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCRQnOqNu0b4AAAAKSURBVAjXY2AA\\nAAACAAHiIbwzAAAAAElFTkSuQmCC')"); |
|
154 | "from IPython.display import Image; Image(" + black_dot_png + ")"); | |
152 | }); |
|
155 | }); | |
|
156 | this.thenEvaluate(function() { IPython.notebook.save_notebook(); }); | |||
153 |
|
157 | |||
154 | this.then(function ( ) { |
|
158 | this.then(function ( ) { | |
155 | check_output_area.apply(this, ['pyout', ['text', 'png']]); |
|
159 | check_output_area.apply(this, ['pyout', ['text', 'png']]); | |
@@ -157,10 +161,29 b' casper.notebook_test(function () {' | |||||
157 |
|
161 | |||
158 | this.then(function() { |
|
162 | this.then(function() { | |
159 | clear_and_execute(this, |
|
163 | clear_and_execute(this, | |
160 | "from IPython.display import Image, display; display(Image('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAWJLR0QA\\niAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCRQnOqNu0b4AAAAKSURBVAjXY2AA\\nAAACAAHiIbwzAAAAAElFTkSuQmCC'))"); |
|
164 | "from IPython.display import Image, display; display(Image(" + black_dot_png + "))"); | |
161 | }); |
|
165 | }); | |
162 |
|
166 | |||
163 | this.then(function ( ) { |
|
167 | this.then(function ( ) { | |
164 | check_output_area.apply(this, ['display_data', ['text', 'png']]); |
|
168 | check_output_area.apply(this, ['display_data', ['text', 'png']]); | |
165 | }); |
|
169 | }); | |
|
170 | ||||
|
171 | ||||
|
172 | this.then(function() { | |||
|
173 | clear_and_execute(this, | |||
|
174 | "from IPython.display import Image; Image(" + black_dot_jpeg + ", format='jpeg')"); | |||
|
175 | }); | |||
|
176 | ||||
|
177 | this.then(function ( ) { | |||
|
178 | check_output_area.apply(this, ['pyout', ['text', 'jpeg']]); | |||
|
179 | }); | |||
|
180 | ||||
|
181 | this.then(function() { | |||
|
182 | clear_and_execute(this, | |||
|
183 | "from IPython.display import Image, display; display(Image(" + black_dot_jpeg + ", format='jpeg'))"); | |||
|
184 | }); | |||
|
185 | ||||
|
186 | this.then(function ( ) { | |||
|
187 | check_output_area.apply(this, ['display_data', ['text', 'jpeg']]); | |||
|
188 | }); | |||
166 | }); |
|
189 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now