o
    ¹i}  ã                   @   s(   d Z ddlmZmZ dd„ Zdd„ ZdS )z&Tests buffering of execution requests.é   )Ú	TREE_PAGEÚEDITOR_PAGEc                 C   sb   | dgƒ}|  ¡  |jdtd | d¡ |jdtd |  ¡  | d¡}| ¡  ¡ dks/J ‚dS )z@Test that execution request made while disconnected is buffered.zprint(1 + 2)z/() => { IPython.notebook.kernel.stop_channels }©Úpageé    z+() => { IPython.notebook.kernel.reconnect }Ú3N©Úwait_for_kernel_readyÚevaluater   Úexecute_cellÚwait_for_cell_outputÚget_inner_textÚstrip©Úprefill_notebookÚnotebook_frontendÚoutputs© r   úd/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/nbclassic/tests/end_to_end/test_buffering.pyÚ test_kernels_buffer_without_conn   s   


r   c                 C   sŒ   | g d¢ƒ}|  ¡  |jdtd | d¡ | d¡ | d¡ | d¡ | d¡ |jdtd |  ¡  | d¡}| ¡  ¡ d	ksDJ ‚d
S )z-Test that buffered requests execute in order.)Ú zk=1zk+=1zk*=3zprint(k)z.() => IPython.notebook.kernel.stop_channels();r   r   é   é   é   z*() => IPython.notebook.kernel.reconnect();Ú7Nr   r   r   r   r   Ú$test_buffered_cells_execute_in_order   s   





r   N)Ú__doc__Úutilsr   r   r   r   r   r   r   r   Ú<module>   s    