o
    œ©Zh	  ã                   @   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g d¢|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:zK*** all frames above hidden, use `skip_hidden False` to get get into those.Úexit)ÚpexpectÚreÚcompileÚosÚenvironÚcopyZspawnÚsysÚ
executabler   ÚtimeoutÚexpectZsendlineZexpect_exactÚclose)r   r   Z	in_promptZipdb_promptr   Úchild© r   ú^/var/www/html/lang_env/lib/python3.10/site-packages/IPython/terminal/tests/test_debug_magic.pyÚ*test_debug_magic_passes_through_generators   sT   

ÿ

























ÿ



r   )Ú__doc__r   r   ZIPython.testing.decoratorsr   ZIPython.testingr   r   r   r   r   r   Ú<module>   s    