@@ -13,23 +13,22 @@ def wait_for_kernel_ready(notebook):
1313 wait_for_selector (notebook .browser , ".kernel_idle_icon" )
1414
1515
16- def kernels_buffer_without_conn ( notebook ):
16+ def test_kernels_buffer_without_conn ( prefill_notebook ):
1717 """Test that execution request made while disconnected is buffered."""
18- # Assert that cell executed while kernel is disconnected still
19- # executes when reconnected
18+ notebook = prefill_notebook ([ "print(1 + 2)" ])
19+
2020 wait_for_kernel_ready (notebook )
2121 notebook .browser .execute_script ("IPython.notebook.kernel.stop_channels();" )
22- notebook .edit_cell (index = 0 , content = "print(1 + 2)" )
2322 notebook .execute_cell (0 )
2423 notebook .browser .execute_script ("IPython.notebook.kernel.reconnect();" )
2524 wait_for_kernel_ready (notebook )
25+
2626 assert wait_for_cell_text_output (notebook , 0 ) == "3"
27- notebook .delete_cell (0 )
2827
2928
30- def buffered_cells_execute_in_order ( notebook ):
29+ def test_buffered_cells_execute_in_order ( prefill_notebook ):
3130 """Test that buffered requests execute in order."""
32- notebook . append ( ' k=1' , 'k+=1' , 'k*=3' , 'print(k)' )
31+ notebook = prefill_notebook ([ '' , ' k=1' , 'k+=1' , 'k*=3' , 'print(k)' ] )
3332
3433 # Repeated execution of cell queued up in the kernel executes
3534 # each execution request in order.
@@ -49,8 +48,3 @@ def buffered_cells_execute_in_order(notebook):
4948
5049 # Check that current value of k is 7
5150 assert wait_for_cell_text_output (notebook , 4 ) == "7"
52-
53-
54- def test_buffering (notebook ):
55- kernels_buffer_without_conn (notebook )
56- buffered_cells_execute_in_order (notebook )
0 commit comments