o
    ŠågÙ  ã                   @   s¢   d Z ddlZddlZddlmZ edƒ dd„ Zejd Zze	eeƒZ
W n  eyD   eejkr3eZ
nedkrAe ej¡ZejZ
n‚ Y nw ed	e
d
d� e
ƒ  dS )z“
Helper for testing a C++ exception throw aborts the process.

Takes one argument, the name of the function in :mod:`_test_extension_cpp` to call.
é    N)Ú_test_extension_cppzfail_cpp_exception is runningc                  C   s   dd„ } t   | ¡}| ¡  d S )Nc                   S   s   t  t j¡ d S )N)r   Ú"test_exception_switch_and_do_in_g2Útest_exception_throw_nonstd© r   r   ú]/var/www/html/flaskapp/venv/lib/python3.10/site-packages/greenlet/tests/fail_cpp_exception.pyÚ_   s   ÿz5run_unhandled_exception_in_greenlet_aborts.<locals>._)ÚgreenletÚswitch)r   Úg1r   r   r   Ú*run_unhandled_exception_in_greenlet_aborts   s   
r   é   Úrun_as_greenlet_targetÚraisingT)Úflush)Ú__doc__Úsysr   Úgreenlet.testsr   Úprintr   ÚargvÚ	func_nameÚgetattrÚfuncÚAttributeErrorÚ__name__Útest_exception_throw_stdÚgr	   r   r   r   r   Ú<module>   s(   
	
€ù
