o
    i                     @   s4   d Z ddlmZ dd Zdd Zdd Zd	d
 ZdS )z&Tests buffering of execution requests.   )wait_for_selectorc                 C   s   | j | }t|ddd}|jS )Nz.output_textT)single)cellsr   text)notebookindexcelloutput r
   a/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/notebook/tests/selenium/test_buffering.pywait_for_cell_text_output   s   
r   c                 C   s   t | jd d S )Nz.kernel_idle_icon)r   browser)r   r
   r
   r   wait_for_kernel_ready   s   r   c                 C   sR   | dg}t | |jd |d |jd t | t|ddks'J dS )z@Test that execution request made while disconnected is buffered.zprint(1 + 2)(IPython.notebook.kernel.stop_channels();    $IPython.notebook.kernel.reconnect();3Nr   r   execute_scriptexecute_cellr   prefill_notebookr   r
   r
   r    test_kernels_buffer_without_conn   s   

r   c                 C   s|   | g d}t | |jd |d |d |d |d |d |jd t | t|ddks<J d	S )
z-Test that buffered requests execute in order.) zk=1zk+=1zk*=3zprint(k)r   r            r   7Nr   r   r
   r
   r   $test_buffered_cells_execute_in_order   s   




r   N)__doc__utilsr   r   r   r   r   r
   r
   r
   r   <module>   s    