o
    éË·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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-mÚ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ÚexpectÚsendlineÚexpect_exactÚclose)r   r   Ú	in_promptÚipdb_promptr   Úchild© r   ú^/var/www/ideatree/venv/lib/python3.10/site-packages/IPython/terminal/tests/test_debug_magic.pyÚ*test_debug_magic_passes_through_generators   sP   

ÿ






























r   )Ú__doc__r   r   ÚIPython.testing.decoratorsr   ÚIPython.testingr   r   r   r   r   r   Ú<module>   s    