o
    JAf	  ã                   @   s   	 d dl Z ddd„ZdS )é    Né   c                    s   	 ‡ fdd„}|S )Nc                    s   t  ˆ ¡‡‡ fdd„ƒ}|S )Nc                    sJ   ˆ| ƒ‰| j ‰d ‰‡ ‡‡‡‡fdd„‰ ˆ dˆjˆ ¡ ˆ ¡  ˆr#ˆ‚d S )Nc               
      sn   zt ˆƒ W n& ty   ˆ ¡  Y d S  ty, }  z| ‰ˆ ¡  W Y d } ~ d S d } ~ ww ˆ ˆˆjˆ ¡ d S )N)ÚnextÚStopIterationÚquitÚ	ExceptionÚafterÚ
after_idle)Úexc)Úafter_callbackÚdelayÚ	exceptionÚrootÚtest_generator© ú>/usr/lib/python3.10/idlelib/idle_test/tkinter_testing_utils.pyr
   '   s   €þzVrun_in_tk_mainloop.<locals>.decorator.<locals>.new_test_method.<locals>.after_callbackr   )r   r   r   Zmainloop)Úself)r   Útest_method)r
   r   r   r   r   Únew_test_method   s   ÿz>run_in_tk_mainloop.<locals>.decorator.<locals>.new_test_method)Ú	functoolsÚwraps)r   r   ©r   )r   r   Ú	decorator   s   z%run_in_tk_mainloop.<locals>.decoratorr   )r   r   r   r   r   Úrun_in_tk_mainloop   s    r   )r   )r   r   r   r   r   r   Ú<module>   s    