@@ -85,7 +85,7 @@ def _execute_code(self, code, tests=True, silent=False, store_history=True):
8585 def test_display_vector (self ):
8686 """Display of vectors."""
8787 code = "1:3"
88- reply , output_msgs = self ._execute_code (code )
88+ _ , output_msgs = self ._execute_code (code )
8989
9090 # we currently send those formats: text/plain, text/html, text/latex, and text/markdown
9191 data = output_msgs [0 ]["content" ]["data" ]
@@ -101,15 +101,15 @@ def test_display_vector(self):
101101 def test_display_vector_only_plaintext (self ):
102102 """Display of plain text vectors."""
103103 code = without_rich_display .format ("1:3" )
104- reply , output_msgs = self ._execute_code (code )
104+ _ , output_msgs = self ._execute_code (code )
105105 data = output_msgs [0 ]["content" ]["data" ]
106106 assert len (data ) == 1 , data .keys ()
107107 assert data ["text/plain" ] == "[1] 1 2 3"
108108
109109 def test_irkernel_plots (self ):
110110 """Plotting."""
111111 code = "plot(1:3)"
112- reply , output_msgs = self ._execute_code (code )
112+ _ , output_msgs = self ._execute_code (code )
113113
114114 # we currently send two formats: png, and text/plain
115115 data = output_msgs [0 ]["content" ]["data" ]
@@ -134,7 +134,7 @@ def test_irkernel_plots_only_png(self):
134134 old_options <- options(jupyter.plot_mimetypes = c('image/png'))
135135 plot(1:3)
136136 """
137- reply , output_msgs = self ._execute_code (code )
137+ _ , output_msgs = self ._execute_code (code )
138138
139139 # Only png, no svg or plain/text
140140 data = output_msgs [0 ]["content" ]["data" ]
@@ -149,7 +149,7 @@ def test_irkernel_plots_only_png(self):
149149
150150 # And reset
151151 code = "options(old_options)"
152- reply , output_msgs = self ._execute_code (code , tests = False )
152+ _ , output_msgs = self ._execute_code (code , tests = False )
153153
154154 def test_irkernel_plots_only_svg (self ):
155155 if platform .system () == "Windows" :
@@ -160,7 +160,7 @@ def test_irkernel_plots_only_svg(self):
160160 old_options <- options(jupyter.plot_mimetypes = c('image/svg+xml'))
161161 plot(1:3)
162162 """
163- reply , output_msgs = self ._execute_code (code )
163+ _ , output_msgs = self ._execute_code (code )
164164
165165 # Only svg, no png or plain/text
166166 data = output_msgs [0 ]["content" ]["data" ]
@@ -179,7 +179,7 @@ def test_irkernel_plots_only_svg(self):
179179
180180 # And reset
181181 code = "options(old_options)"
182- reply , output_msgs = self ._execute_code (code , tests = False )
182+ _ , output_msgs = self ._execute_code (code , tests = False )
183183
184184 def test_irkernel_plots_without_rich_display (self ):
185185 if platform .system () == "Windows" :
@@ -189,7 +189,7 @@ def test_irkernel_plots_without_rich_display(self):
189189 options(jupyter.rich_display = FALSE)
190190 plot(1:3)
191191 """
192- reply , output_msgs = self ._execute_code (code )
192+ _ , output_msgs = self ._execute_code (code )
193193
194194 # Even with rich output as false, we send plots
195195 data = output_msgs [0 ]["content" ]["data" ]
@@ -199,12 +199,12 @@ def test_irkernel_plots_without_rich_display(self):
199199
200200 # And reset
201201 code = "options(jupyter.rich_display = TRUE)"
202- reply , output_msgs = self ._execute_code (code , tests = False )
202+ _ , output_msgs = self ._execute_code (code , tests = False )
203203
204204 def test_irkernel_df_default_rich_output (self ):
205205 """Data.frame rich representation."""
206206 code = "data.frame(x = 1:3)"
207- reply , output_msgs = self ._execute_code (code )
207+ _ , output_msgs = self ._execute_code (code )
208208
209209 # we currently send three formats: text/plain, html, and latex
210210 data = output_msgs [0 ]["content" ]["data" ]
@@ -217,7 +217,7 @@ def test_irkernel_df_no_rich_output(self):
217217 data.frame(x = 1:3)
218218 options(jupyter.rich_display = TRUE)
219219 """
220- reply , output_msgs = self ._execute_code (code )
220+ _ , output_msgs = self ._execute_code (code )
221221
222222 # only text/plain
223223 data = output_msgs [0 ]["content" ]["data" ]
@@ -229,7 +229,7 @@ def test_html_isolated(self):
229229 repr_html.full_page <- function(obj) sprintf('<html><body>%s</body></html>', obj)
230230 structure(0, class = 'full_page')
231231 """
232- reply , output_msgs = self ._execute_code (code )
232+ _ , output_msgs = self ._execute_code (code )
233233
234234 data = output_msgs [0 ]["content" ]["data" ]
235235 assert len (data ) == 2 , data .keys ()
@@ -242,14 +242,14 @@ def test_html_isolated(self):
242242
243243 def test_in_kernel_set (self ):
244244 """Jupyter.in_kernel option."""
245- reply , output_msgs = self ._execute_code ('getOption("jupyter.in_kernel")' )
245+ _ , output_msgs = self ._execute_code ('getOption("jupyter.in_kernel")' )
246246 data = output_msgs [0 ]["content" ]["data" ]
247247 assert len (data ) >= 1 , data .keys ()
248248 assert data ["text/plain" ] == "[1] TRUE" , data .keys ()
249249
250250 def test_warning_message (self ):
251251 self .flush_channels ()
252- reply , output_msgs = self .execute_helper ('options(warn=1); warning(simpleWarning("wmsg"))' )
252+ _ , output_msgs = self .execute_helper ('options(warn=1); warning(simpleWarning("wmsg"))' )
253253 assert output_msgs [0 ]["msg_type" ] == "stream"
254254 assert output_msgs [0 ]["content" ]["name" ] == "stderr"
255255 if platform .system () == "Windows" :
@@ -258,7 +258,7 @@ def test_warning_message(self):
258258 assert output_msgs [0 ]["content" ]["text" ].strip () == "Warning message:\n “wmsg”"
259259
260260 self .flush_channels ()
261- reply , output_msgs = self .execute_helper (
261+ _ , output_msgs = self .execute_helper (
262262 'options(warn=1); f <- function() warning("wmsg"); f()'
263263 )
264264 assert output_msgs [0 ]["msg_type" ] == "stream"
@@ -271,18 +271,18 @@ def test_warning_message(self):
271271 def test_should_increment_history (self ):
272272 """Properly increments execution history."""
273273 code = "data.frame(x = 1:3)"
274- reply , output_msgs = self ._execute_code (code )
275- reply2 , output_msgs2 = self ._execute_code (code )
274+ reply , _ = self ._execute_code (code )
275+ reply2 , _ = self ._execute_code (code )
276276 execution_count_1 = reply ["content" ]["execution_count" ]
277277 execution_count_2 = reply2 ["content" ]["execution_count" ]
278278 assert execution_count_1 + 1 == execution_count_2
279279
280280 def test_should_not_increment_history (self ):
281281 """Does not increment history if silent is true or store_history is false."""
282282 code = "data.frame(x = 1:3)"
283- reply , output_msgs = self ._execute_code (code , store_history = False )
284- reply2 , output_msgs2 = self ._execute_code (code , store_history = False )
285- reply3 , output_msgs3 = self ._execute_code (code , tests = False , silent = True )
283+ reply , _ = self ._execute_code (code , store_history = False )
284+ reply2 , _ = self ._execute_code (code , store_history = False )
285+ reply3 , _ = self ._execute_code (code , tests = False , silent = True )
286286 execution_count_1 = reply ["content" ]["execution_count" ]
287287 execution_count_2 = reply2 ["content" ]["execution_count" ]
288288 execution_count_3 = reply3 ["content" ]["execution_count" ]
0 commit comments