U
    ýÇ-eG	  ã                   @   s<   d Z ddlZddlZddlmZ ddlmZ edd„ ƒZdS )zTest embedding of IPythoné    N)Ú
skip_win32)ÚIPYTHON_TESTING_TIMEOUT_SCALEc                  C   s„  ddl } ddl}| d¡}d}tj ¡ }| jtjddddg|d	}d
t	 |_
| |¡ dt	 |_
| d¡ | d¡ | d¡ | |¡ | d¡ | d¡ | |¡ | d¡ | d¡ | d¡ dt	 |_
| d¡ | |¡ | d¡ | d¡ | |¡ | d¡ | d¡ | |¡ | d¡ | d¡ | |¡ | d¡ | d¡ | |¡ | d¡ | |¡ | d¡ | ¡  dS )zY
    This test that we can correctly pass through frames of a generator post-mortem.
    r   Ns   In ?\[\d+\]:zipdb>z-mZIPythonz--colors=nocolorz--simple-prompt)Úenvé   é   z	def f(x):z    raise ExceptionÚ zgen = (f(x) for x in [0])zfor x in gen:z    passé
   z
Exception:z%debugz----> 2     raise ExceptionÚuz!----> 1 gen = (f(x) for x in [0])z----> 1 for x in gen:z*** Oldest frameÚexit)ÚpexpectÚreÚcompileÚosÚenvironÚcopyÚspawnÚsysÚ
executabler   ÚtimeoutÚexpectZsendlineZexpect_exactÚclose)r   r   Z	in_promptZipdb_promptr   Úchild© r   úh/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/IPython/terminal/tests/test_debug_magic.pyÚ*test_debug_magic_passes_through_generators   sP    

ÿ






























r   )Ú__doc__r   r   ZIPython.testing.decoratorsr   ZIPython.testingr   r   r   r   r   r   Ú<module>   s   