Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_contextlib_async.cpython-311.pyc
�

�Ke0_��z�ddlZddlmZmZmZmZmZmZddlZddl	m
Z
ddlZddlZddl
mZe
jd���d�Zd�ZGd	�d
ej��ZGd�dej��ZGd
�dej��ZGd�deej��ZGd�dej��Zedkrej��dSdS)�N)�asynccontextmanager�AbstractAsyncContextManager�AsyncExitStack�nullcontext�aclosing�contextmanager)�support)�TestBaseExitStackT)�modulec�F��tj����fd���}|S)z5Decorator to turn an async function into a test case.c�@���|i|��}tj|��dS�N)�asyncio�run)�args�kwargs�coro�funcs   ��D/usr/local/apps/python3/lib/python3.11/test/test_contextlib_async.py�wrapperz_async_test.<locals>.wrappers-����t�T�$�V�$�$����D������)�	functools�wraps)rrs` r�_async_testrs8����_�T�����������Nrc�.�tjd��dSr)r�set_event_loop_policy�rr�tearDownModulers���!�$�'�'�'�'�'rc�F�eZdZed���Zed���Zd�Zd�ZdS)�TestAbstractAsyncContextManagerc��&K�Gd�dt��}|��}|�|����d{V��|��|4�d{V��}|�||��ddd���d{V��dS#1�d{V��swxYwYdS)Nc���eZdZ�fd�Z�xZS)�@TestAbstractAsyncContextManager.test_enter.<locals>.DefaultEnterc��D�K�t��j|��d{V��dSr��super�	__aexit__��selfr�	__class__s  �rr'zJTestAbstractAsyncContextManager.test_enter.<locals>.DefaultEnter.__aexit__�3�����'�e�g�g�'��.�.�.�.�.�.�.�.�.�.r��__name__�
__module__�__qualname__r'�
__classcell__�r*s@r�DefaultEnterr#�8�������
/�
/�
/�
/�
/�
/�
/�
/�
/rr2)r�assertIs�
__aenter__)r)r2�manager�contexts    r�
test_enterz*TestAbstractAsyncContextManager.test_entersE����	/�	/�	/�	/�	/�6�	/�	/�	/��,�.�.���
�
�G�.�.�0�0�0�0�0�0�0�0�'�:�:�:��	,�	,�	,�	,�	,�	,�	,�g��M�M�'�7�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�	,�	,s�B�
B
�
B
c���K�td�����fd�}g}td��}|�t��5���4�d{V��|��23d{V��}|�|��|�6	ddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�|dg��dS)Nc�K�dWV�dSrrrrr�ctxzUTestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit.<locals>.ctx,������E�E�E�E�E�Erc��K����4�d{V��dWV�ddd���d{V��dS#1�d{V��swxYwYdS)N�r)r;s�r�genzUTestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit.<locals>.gen0s�������s�u�u�
�
�
�
�
�
�
�
������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�-�
7�7�r>)r�
ValueError�assertRaises�append�assertEqual)r)r?�ret�exc�valr;s     @r�(test_async_gen_propagates_generator_exitzHTestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit(s������
�	�	�
�	�	�	�	�	�	�	�����n�n��
�
�
�z�
*�
*�	�	��s�u�u�
�
�
�
�
�
�
�
�!$�����������#��J�J�s�O�O�O��I�"'��
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
����r�d�#�#�#�#�#sB�B/�B� A>�&B�B/�
B	�B/�B	� B/�/B3�6B3c��Gd�dt��}|�t��5|��ddd��dS#1swxYwYdS)Nc��eZdZdS)�KTestAbstractAsyncContextManager.test_exit_is_abstract.<locals>.MissingAexitN�r-r.r/rrr�MissingAexitrK?��������DrrM)rrB�	TypeError)r)rMs  r�test_exit_is_abstractz5TestAbstractAsyncContextManager.test_exit_is_abstract>s���	�	�	�	�	�6�	�	�	��
�
�y�
)�
)�	�	��L�N�N�N�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A�A
�
A
c��Gd�d��}|�t|t����Gd�dt��}|�t|t����Gd�d|��}|�t|t����Gd�d|��}|�t|t����dS)	Nc��eZdZd�Zd�ZdS)�WTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.ManagerFromScratchc��
K�|Srr�r)s rr5zbTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.ManagerFromScratch.__aenter__Gs�����rc��
K�dSrr)r)�exc_type�	exc_value�	tracebacks    rr'zaTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.ManagerFromScratch.__aexit__Is�����trN�r-r.r/r5r'rrr�ManagerFromScratchrSFs2������
�
�
�
�
�
�
�
rr[c���eZdZ�fd�Z�xZS)�QTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.DefaultEnterc��D�K�t��j|��d{V��dSrr%r(s  �rr'z[TestAbstractAsyncContextManager.test_structural_subclassing.<locals>.DefaultEnter.__aexit__Or+rr,r1s@rr2r]Nr3rr2c��eZdZdZdS)�OTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.NoneAenterN�r-r.r/r5rrr�
NoneAenterr`Ts�������J�J�Jrrbc��eZdZdZdS)�NTestAbstractAsyncContextManager.test_structural_subclassing.<locals>.NoneAexitN�r-r.r/r'rrr�	NoneAexitrdYs�������I�I�Irrf)�
assertTrue�
issubclassr�assertFalse)r)r[r2rbrfs     r�test_structural_subclassingz;TestAbstractAsyncContextManager.test_structural_subclassingEs2��	�	�	�	�	�	�	�	�	
���
�#5�7R�S�S�T�T�T�	/�	/�	/�	/�	/�6�	/�	/�	/�	
���
�<�1L�M�M�N�N�N�	�	�	�	�	�+�	�	�	�	
����J�0K�L�L�M�M�M�	�	�	�	�	�*�	�	�	�	
����I�/J�K�K�L�L�L�L�LrN)r-r.r/rr8rHrPrjrrrr r sk�������	,�	,��[�	,��$�$��[�$�*���M�M�M�M�Mrr c���eZdZed���Zed���Zed���Zed���Zed���Zed���Z	ed���Z
ed���Zed	���Zed
���Z
ed���Zd�Zd
�Zejd���Zejed�����Zed���Zed���Zed���Zed���Zed���ZdS)�AsyncContextManagerTestCasec��P�K�g�t�fd���}|��4�d{V��}|��dg��|�|d����|��ddd���d{V��n#1�d{V��swxYwY|��gd���dS)Nc�j�K���d��dWV���d��dS�N��*���rC��states�r�woohoozEAsyncContextManagerTestCase.test_contextmanager_plain.<locals>.woohoods9������L�L��O�O�O��H�H�H�H��L�L������rrprq�rprqrr)rrDrC�r)rv�xrus   @r�test_contextmanager_plainz5AsyncContextManagerTestCase.test_contextmanager_plainasI�������	�	�	�	�	�
�	�	��6�8�8�	�	�	�	�	�	�	�q����U�Q�C�(�(�(����Q��#�#�#��L�L��O�O�O�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�������-�-�-�-�-s�AA=�=
B�
Bc���K�g�t�fd���}|�t��5|��4�d{V��}|��dg��|�|d����|��t���#1�d{V��swxYwY	ddd��n#1swxYwY|��gd���dS)Nc��K���d��	dWV���d��dS#��d��wxYwrorsrts�rrvzGAsyncContextManagerTestCase.test_contextmanager_finally.<locals>.woohoorsV������L�L��O�O�O�
"���������S�!�!�!�!�!�����S�!�!�!�!���s	�6�A
rprqrw)rrB�ZeroDivisionErrorrDrCrxs   @r�test_contextmanager_finallyz7AsyncContextManagerTestCase.test_contextmanager_finallyos��������	�	"�	"�	"�	"�
�	�	"��
�
�0�
1�
1�	*�	*��v�x�x�
*�
*�
*�
*�
*�
*�
*�1�� � ����,�,�,�� � ��B�'�'�'����Q����'�)�)�)�	
*�
*�
*�
*�
*�
*�
*�
*�
*�
*����
*�
*�
*�
*�
*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�	
�������-�-�-�-�-s0�B2�AB�
B	�B2�!B	�"B2�2B6�9B6c��K�td���}	|��4�d{V��ddzddd���d{V��n#1�d{V��swxYwYn0#t$r#}tj|j��}Yd}~nd}~wwxYw|�t
|��d��|�|djd��|�|djd��Gd�dt��}	|��4�d{V��|d���#1�d{V��swxYwYn+#|$r#}tj|j��}Yd}~nd}~wwxYw|�t
|��d��|�|djd��|�|djd	��Gd
�dt��}Gd�d
t��}td��td��|d��|d��fD�]0}|�t|�����5	|��4�d{V��|�#1�d{V��swxYwY	|�|�d���nN#t|��$r9}|�||��tj|j��}Yd}~nd}~wwxYw|�t
|��d��|�|djd��|�|djd��ddd��n#1swxYwY��2dS)Nc�K�dWV�dSrrrrr�fzDAsyncContextManagerTestCase.test_contextmanager_traceback.<locals>.f�r<rrpr�test_contextmanager_tracebackz1/0c��eZdZdS)�WAsyncContextManagerTestCase.test_contextmanager_traceback.<locals>.RuntimeErrorSubclassNrLrrr�RuntimeErrorSubclassr��rNrr�rqzraise RuntimeErrorSubclass(42)c��eZdZdS)�XAsyncContextManagerTestCase.test_contextmanager_traceback.<locals>.StopIterationSubclassNrLrrr�StopIterationSubclassr��rNrr�c��eZdZdS)�]AsyncContextManagerTestCase.test_contextmanager_traceback.<locals>.StopAsyncIterationSubclassNrLrrr�StopAsyncIterationSubclassr��rNrr��spam�ham��type� was suppressedzraise stop_exc)rr}rY�
extract_tb�
__traceback__rD�len�name�line�RuntimeError�
StopIteration�StopAsyncIteration�subTestr��failr4)r)r��e�framesr�r�r��stop_excs        rr�z9AsyncContextManagerTestCase.test_contextmanager_traceback�sU����	�	�	�
�	�	�	;��q�s�s�
�
�
�
�
�
�
�
��!���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��� �	;�	;�	;��)�!�/�:�:�F�F�F�F�F�F�����	;����	
����V���a�(�(�(��������)H�I�I�I���������/�/�/�	�	�	�	�	�<�	�	�	�	;��q�s�s�
/�
/�
/�
/�
/�
/�
/�
/�*�*�2�.�.�.�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/����
/�
/�
/�
/�
/��#�	;�	;�	;��)�!�/�:�:�F�F�F�F�F�F�����	;����	
����V���a�(�(�(��������)H�I�I�I��������)I�J�J�J�	�	�	�	�	�M�	�	�	�	�	�	�	�	�);�	�	�	�
�&�!�!��u�%�%�!�!�&�)�)�&�&�v�.�.�	
�	C�	C�H����4��>�>��2�2�
C�
C�<� �q�s�s�'�'�'�'�'�'�'�'�&��'�'�'�'�'�'�'�'�'�'����'�'�'�'�'��I�I��:�:�:�;�;�;�;��	�H�~�~�C�C�C��M�M�!�X�.�.�.�&�1�!�/�B�B�F�F�F�F�F�F�����C����� � ��V���a�0�0�0�� � �����1P�Q�Q�Q�� � �����1A�B�B�B�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C����
C�
C�
C�
C��
	C�	Cs��A�<�A�
A�A�	A�
A�
A;�A6�6A;�7D%�D�
D�D%� D�!D%�%E
�*E�E
�3L2�5I3�I�
I�I3�I�I3�L2�3J>�/J9�4L2�9J>�>A(L2�2L6	�9L6	c��K�td���}|��}|����d{V��|�|�tt	d��d���d{V����dS)Nc�K�dWV�dSrrrrr�wheezHAsyncContextManagerTestCase.test_contextmanager_no_reraise.<locals>.whee�r<r�foo)rr5rir'rO)r)r�r;s   r�test_contextmanager_no_reraisez:AsyncContextManagerTestCase.test_contextmanager_no_reraise�s�����	�	�	�
�	�	��d�f�f���n�n�������������s�}�}�Y�	�%�8H�8H�$�O�O�O�O�O�O�O�O�P�P�P�P�Prc��6K�td���}|��}|����d{V��|�t��5|�t
td��d���d{V��ddd��dS#1swxYwYdS)Nc�0K�	dWV�dS#dWV�YdSxYwrrrrr�whoozTAsyncContextManagerTestCase.test_contextmanager_trap_yield_after_throw.<locals>.whoo�s4����
���������
�����������s��r�)rr5rBr�r'rO�r)r�r;s   r�*test_contextmanager_trap_yield_after_throwzFAsyncContextManagerTestCase.test_contextmanager_trap_yield_after_throw�s����	�	�	�
�	�	�
�d�f�f���n�n����������
�
�
�|�
,�
,�	C�	C��-�-�	�9�U�+;�+;�T�B�B�B�B�B�B�B�B�B�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C����	C�	C�	C�	C�	C�	Cs�0B�B�Bc���K�td���}|��}|�t��5|����d{V��ddd��dS#1swxYwYdS)Nc�
K�dSrrrrrr�zKAsyncContextManagerTestCase.test_contextmanager_trap_no_yield.<locals>.whoo�s����
�
r)rrBr�r5r�s   r�!test_contextmanager_trap_no_yieldz=AsyncContextManagerTestCase.test_contextmanager_trap_no_yield�s�����	�	�	�
�	�	��d�f�f��
�
�
�|�
,�
,�	#�	#��.�.�"�"�"�"�"�"�"�"�"�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#�	#�	#s�A�A#�&A#c��K�td���}|��}|����d{V��|�t��5|�ddd���d{V��ddd��dS#1swxYwYdS)Nc�K�dWV�dWV�dSrrrrrr�zOAsyncContextManagerTestCase.test_contextmanager_trap_second_yield.<locals>.whoo�s �����E�E�E�E��E�E�E�E�E�Er)rr5rBr�r'r�s   r�%test_contextmanager_trap_second_yieldzAAsyncContextManagerTestCase.test_contextmanager_trap_second_yield�s�����	�	�	�
�	�	��d�f�f���n�n����������
�
�
�|�
,�
,�	2�	2��-�-��d�D�1�1�1�1�1�1�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	2�	2s�A<�<B�Bc��K�td���}|��}|����d{V��|�t��5|�t
dd���d{V��ddd��dS#1swxYwYdS)Nc�@K�	dWV�dS#t$rt�wxYwr)r��SyntaxErrorrrrr�zLAsyncContextManagerTestCase.test_contextmanager_non_normalised.<locals>.whoo�s;����
"����������
"�
"�
"�!�!�
"���s��)rr5rBr�r'r�r�s   r�"test_contextmanager_non_normalisedz>AsyncContextManagerTestCase.test_contextmanager_non_normalised�s�����	�	"�	"�
�	�	"��d�f�f���n�n����������
�
�
�{�
+�
+�	:�	:��-�-��d�D�9�9�9�9�9�9�9�9�9�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:�	:�	:s�#B�B�Bc��N��K�g�t��fd���}|��4�d{V��}���dg����|d����|��td���#1�d{V��swxYwY���gd���dS)Nc���K���d��	dWV�dS#t$rC}��|jd�����gd���Yd}~dSd}~wwxYw)Nrprqrrw)rCr}rrD)r�r)rus ��rrvzFAsyncContextManagerTestCase.test_contextmanager_except.<locals>.woohoo�s�������L�L��O�O�O�
6���������$�
6�
6�
6����Q�V�A�Y�'�'�'�� � �����5�5�5�5�5�5�5�5�5�����
6���s�!�
A.�8A)�)A.rprqrrrw)rrDrCr}rxs`  @r�test_contextmanager_exceptz6AsyncContextManagerTestCase.test_contextmanager_except�s��������	�	6�	6�	6�	6�	6�
�	�	6��6�8�8�	)�	)�	)�	)�	)�	)�	)�q����U�Q�C�(�(�(����Q��#�#�#��L�L��O�O�O�#�C�(�(�(�		)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�
	
�������-�-�-�-�-s�AA<�<
B�	Bc��.K�td���}Gd�dt��}Gd�dt��}td��td��|d��|d��fD]�}|�t	|�����5	|��4�d{V��|�#1�d{V��swxYwY	|�|�d	���n-#t$r }|�||��Yd}~nd}~wwxYwddd��n#1swxYwY��dS)
Nc�K�dWV�dSrrrrrrvzOAsyncContextManagerTestCase.test_contextmanager_except_stopiter.<locals>.woohoor<rc��eZdZdS)�^AsyncContextManagerTestCase.test_contextmanager_except_stopiter.<locals>.StopIterationSubclassNrLrrrr�r�rNrr�c��eZdZdS)�cAsyncContextManagerTestCase.test_contextmanager_except_stopiter.<locals>.StopAsyncIterationSubclassNrLrrrr�r�rNrr�r�r�r�r�)rr�r�r�r�r��	Exceptionr4)r)rvr�r�r��exs      r�#test_contextmanager_except_stopiterz?AsyncContextManagerTestCase.test_contextmanager_except_stopiters#����	�	�	�
�	�	�	�	�	�	�	�M�	�	�	�	�	�	�	�	�);�	�	�	�
�&�!�!��u�%�%�!�!�&�)�)�&�&�v�.�.�	
�
	<�
	<�H����4��>�>��2�2�
<�
<�<�%�v�x�x�'�'�'�'�'�'�'�'�&��'�'�'�'�'�'�'�'�'�'����'�'�'�'�'�
�I�I��:�:�:�;�;�;�;��!�0�0�0��M�M�"�h�/�/�/�/�/�/�/�/�����0����	
<�
<�
<�
<�
<�
<�
<�
<�
<�
<�
<����
<�
<�
<�
<��

	<�
	<sZ�D	�C�"B%�%
B/�/C�2B/�3C�7D	�
C:�C5�0D	�5C:�:D	�	D
	�D
	c��K�td���}|�t��5|��4�d{V��ddzddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|�t��5|��4�d{V��t�#1�d{V��swxYwY	ddd��dS#1swxYwYdS)Nc�`K�	dWV�dS#t$r}td|����|�d}~wwxYw)Nzcaught )r�r��rFs rrvzQAsyncContextManagerTestCase.test_contextmanager_wrap_runtimeerror.<locals>.woohoo"sO����
=����������
=�
=�
=�"�?�S�?�?�3�3��<�����
=���s��
-�(�-rpr)rrBr�r�)r)rvs  r�%test_contextmanager_wrap_runtimeerrorzAAsyncContextManagerTestCase.test_contextmanager_wrap_runtimeerror sO����	�	=�	=�
�	�	=��
�
�|�
,�
,�	�	��v�x�x�
�
�
�
�
�
�
�
��A���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�1�
2�
2�	)�	)��v�x�x�
)�
)�
)�
)�
)�
)�
)�
)�(�(�
)�
)�
)�
)�
)�
)�
)�
)�
)�
)����
)�
)�
)�
)�
)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)sd�A3�A�A3�
A 	� A3�#A 	�$A3�3A7�:A7�C�)B1�1
B;	�;C�>B;	�?C�C�Cc�P�d�}t|d���d�����}|S)Nc����fd�}|S)Nc�^������D]\}}t|||���|Sr)�items�setattr)r�k�v�kws   �r�decoratez]AsyncContextManagerTestCase._create_contextmanager_attribs.<locals>.attribs.<locals>.decorate6s8����8�8�:�:�&�&�C�A�a��D��1�%�%�%�%��rr)r�r�s` r�attribszKAsyncContextManagerTestCase._create_contextmanager_attribs.<locals>.attribs5s#���
�
�
�
�
��Or�bar)r�c�K�dWV�dS)�Whee!Nr)r�s r�bazzGAsyncContextManagerTestCase._create_contextmanager_attribs.<locals>.baz;s����
�E�E�E�E�E�Er)r)r)r�r�s   r�_create_contextmanager_attribsz:AsyncContextManagerTestCase._create_contextmanager_attribs4sL��	�	�	�
�	��U�	�	�	�	�	�
�	�
�	�	��
rc��|���}|�|jd��|�|jd��dS)Nr�r�)r�rDr-r��r)r�s  r�test_contextmanager_attribsz7AsyncContextManagerTestCase.test_contextmanager_attribsBsI���1�1�3�3�������e�,�,�,������%�(�(�(�(�(rc�d�|���}|�|jd��dS�Nr��r�rD�__doc__r�s  r�test_contextmanager_doc_attribz:AsyncContextManagerTestCase.test_contextmanager_doc_attribGs1���1�1�3�3�������g�.�.�.�.�.rc���K�|���d��}|�|jd��|4�d{V��	ddd���d{V��dS#1�d{V��swxYwYdSr�r�r�s  r�*test_instance_docstring_given_cm_docstringzFAsyncContextManagerTestCase.test_instance_docstring_given_cm_docstringLs����4�d�1�1�3�3�D�9�9�������g�.�.�.��	�	�	�	�	�	�	�	��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A�
A"�%A"c���K�td���}|dddd���4�d{V��}|�|d��ddd���d{V��dS#1�d{V��swxYwYdS)Nc�K�||||fWV�dSrr�r)rr�kwdss    rrvz9AsyncContextManagerTestCase.test_keywords.<locals>.woohooWs$������t�T�*�*�*�*�*�*�*rr>r@�!�,r�)r>r@r�r��rrD)r)rv�targets   r�
test_keywordsz)AsyncContextManagerTestCase.test_keywordsTs
����
�	+�	+�
�	�	+��6�r���"�=�=�=�	7�	7�	7�	7�	7�	7�	7�����V�%5�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�	7�	7s�A�
A�Ac�������K�d�d�t���fd���}|����fd��������d{V�����d�����d��dS)Nrc�d�K��dz
��}�dz
�dWV��dz����|��dS�Nrp)rD)�before�depth�ncolsr)s ���rrvz:AsyncContextManagerTestCase.test_recursive.<locals>.woohoobsR�����
�Q�J�E��F��Q�J�E��E�E�E�E��Q�J�E����U�F�+�+�+�+�+rc��<�K��dkr����d{V��dSdS)N�
r)r��	recursives��rr�z=AsyncContextManagerTestCase.test_recursive.<locals>.recursivens;������r�z�z��i�k�k�!�!�!�!�!�!�!�!�!��zrr�r�)r)rvr�r�r�s` @@@r�test_recursivez*AsyncContextManagerTestCase.test_recursive]s�������������	�		,�		,�		,�		,�		,�		,�
�	�		,�
����	"�	"�	"�	"�	"�
��	"��i�k�k�������������#�#�#������"�"�"�"�"rc�����K�d�t�fd���}|����fd���}�����|���d{V�������dS)NFc��K�d�dWV�d�dS�NTFr��entereds�rr7z;AsyncContextManagerTestCase.test_decorator.<locals>.context|s"������G��E�E�E�E��G�G�Grc��6�K������dSr)rg�r�r)s��r�testz8AsyncContextManagerTestCase.test_decorator.<locals>.test�s������O�O�G�$�$�$�$�$r)rri�r)r7r�r�s`  @r�test_decoratorz*AsyncContextManagerTestCase.test_decoratorxs���������	�	�	�	�	�
�	�	�
����	%�	%�	%�	%�	%�
��	%�	
����!�!�!��d�f�f������������!�!�!�!�!rc��<��K�d�t�fd���}|����fd���}�������td��5|���d{V��ddd��n#1swxYwY�����dS)NFc�.�K�	d�dWV�d�dS#d�wxYwr�rr�s�rr7zJAsyncContextManagerTestCase.test_decorator_with_exception.<locals>.context�s2�����
 �������������%�����s��c��P�K������td���)Nr�)rg�	NameErrorr�s��rr�zGAsyncContextManagerTestCase.test_decorator_with_exception.<locals>.test�s'������O�O�G�$�$�$��E�"�"�"rr�)rri�assertRaisesRegexr�r�s`  @r�test_decorator_with_exceptionz9AsyncContextManagerTestCase.test_decorator_with_exception�s��������	�	 �	 �	 �	 �
�	�	 �
����	#�	#�	#�	#�	#�
��	#�	
����!�!�!�
�
#�
#�I�u�
5�
5�	�	��$�&�&�L�L�L�L�L�L�L�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����!�!�!�!�!s�A<�<B�Bc����K�td����G�fd�dt��}|��}|�dd���d{V��|�|jd��|�|jd��|�|jd��|��}|�ddd���d{V��|�|jd��|�|jd��|�|jd��|��}|�dd�	���d{V��|�|jd��|�|jd��dS)
Nc�K�dWV�dSrrrrrr7zCAsyncContextManagerTestCase.test_decorating_method.<locals>.context�r<rc�8��eZdZ���dd���ZdS)�@AsyncContextManagerTestCase.test_decorating_method.<locals>.TestNc��4K�||_||_||_dSr)�a�b�c)r)rrrs    r�methodzGAsyncContextManagerTestCase.test_decorating_method.<locals>.Test.method�s��������������rr)r-r.r/r)r7s�r�Testr�s9�������
�W�Y�Y�
�
�
��Y�
�
�
rrrp�rrr)rr)r�objectrrDrrr)r)rr�r7s   @r�test_decorating_methodz2AsyncContextManagerTestCase.test_decorating_method�s������
�	�	�
�	�	�	�	�	�	�	�	�	�6�	�	�	��t�v�v���k�k�!�Q����������������#�#�#�������#�#�#�������&�&�&��t�v�v���k�k�#�s�C�(�(�(�(�(�(�(�(�(�������%�%�%�������%�%�%�������%�%�%��t�v�v���k�k�A��k�#�#�#�#�#�#�#�#�#�������#�#�#�������#�#�#�#�#rN)r-r.r/rrzr~r�r�r�r�r�r�r�r�r�r�r�r	�requires_docstringsr�r�r�r�r�r�r
rrrrlrl_s2�������.�.��[�.��.�.��[�.�"�5C�5C��[�5C�n�Q�Q��[�Q��
C�
C��[�
C��#�#��[�#��2�2��[�2��:�:��[�:��.�.��[�.�"�<�<��[�<�4�)�)��[�)�&���)�)�)�

� �/�/�!� �/�
� �����[�!� ���7�7��[�7��#�#��[�#�4�"�"��[�"�$�"�"��[�"�,�$�$��[�$�$�$rrlc�p�eZdZejd���Zed���Zed���Zed���Z	dS)�AclosingTestCasec�r�tj}td��}|�|j|��dSr)rr�rD)r)�cm_docstring�objs   r�test_instance_docsz#AclosingTestCase.test_instance_docs�s3���'���t�n�n�������l�3�3�3�3�3rc��:�K�g�G�fd�d��}|��}|��g��t|��4�d{V��}|�||��ddd���d{V��n#1�d{V��swxYwY|��dg��dS)Nc���eZdZ�fd�ZdS)�)AclosingTestCase.test_aclosing.<locals>.Cc��6�K���d��dSr�rs�r)rus �r�aclosez0AclosingTestCase.test_aclosing.<locals>.C.aclose����������Q�����rN�r-r.r/rrts�r�Cr��.�������
 �
 �
 �
 �
 �
 �
 rrrp)rDr�r)rry�yrus    @r�
test_aclosingzAclosingTestCase.test_aclosing�sM�������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �
�A�C�C�������#�#�#��A�;�;�	#�	#�	#�	#�	#�	#�	#�!����Q��"�"�"�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#�������$�$�$�$�$s�
A3�3
A=�A=c���K�g�G�fd�d��}|��}|��g��|�t��5t|��4�d{V��}|�||��ddzddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|��dg��dS)Nc���eZdZ�fd�ZdS)�/AclosingTestCase.test_aclosing_error.<locals>.Cc��6�K���d��dSr�rsrs �rrz6AclosingTestCase.test_aclosing_error.<locals>.C.aclose�rrNrrts�rrr!�rrrrpr)rDrBr}rrs    @r�test_aclosing_errorz$AclosingTestCase.test_aclosing_error�s��������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �
�A�C�C�������#�#�#�
�
�
�0�
1�
1�	�	���{�{�
�
�
�
�
�
�
�a�� � ��A�&�&�&��A���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
������$�$�$�$�$s6�B0�%B�B0�
B	�B0� B	�!B0�0B4�7B4c����K�g�t�fd�����fd�}|��}|��g��|�t��5t	|��4�d{V��}|�||��|�d|����d{V����ddzddd���d{V��n#1�d{V��swxYwYddd��n#1swxYwY|��dg��dS)Nc3�t�K�	dV���d��dS#��d��wxYwr�rsrts�r�
sync_resourcez>AclosingTestCase.test_aclosing_bpo41229.<locals>.sync_resource�s<�����
 ��������Q����������Q�������s� �7c�f�K����5dWV�dWV�ddd��dS#1swxYwYdS)N������r)r&s�r�agenfuncz9AclosingTestCase.test_aclosing_bpo41229.<locals>.agenfunc�s����������
�
�����������
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�&�*�*r(rpr)rrDrBr}r�	__anext__)r)r*ryrrur&s    @@r�test_aclosing_bpo41229z'AclosingTestCase.test_aclosing_bpo41229�s���������	�	 �	 �	 �	 �
��	 �	�	�	�	�	�

�H�J�J�������#�#�#�
�
�
�0�
1�
1�	�	���{�{�
�
�
�
�
�
�
�a�� � ��A�&�&�&�� � ��1�;�;�=�=�%8�%8�%8�%8�%8�%8�9�9�9��A���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
������$�$�$�$�$s7�C'�.A
C
�8C'�

C	�C'�C	�C'�'C+�.C+N)
r-r.r/r	rrrrr#r,rrrr
r
�s�������� �4�4�!� �4�
�	%�	%��[�	%��%�%��[�%��%�%��[�%�%�%rr
c���eZdZGd�de��ZeZgd�Zd�Zed���Z	ed���Z
ed���Zed���Zed	���Z
ed
���Zed���ZdS)
�TestAsyncExitStackc�6�eZdZed���Zd�Zd�Zd�ZdS)�%TestAsyncExitStack.SyncAsyncExitStackc�T��tj��������|��}|��fd�������|���}|s|���S|j}	|�#||_|�xYw)Nc�,������Sr)�stop)r��loops �r�<lambda>zETestAsyncExitStack.SyncAsyncExitStack.run_coroutine.<locals>.<lambda>s���$�)�)�+�+�r)	r�get_event_loop_policy�get_event_loop�create_task�add_done_callback�run_forever�	exception�result�__context__)r�trFr7r4s    @r�
run_coroutinez3TestAsyncExitStack.SyncAsyncExitStack.run_coroutines�����0�2�2�A�A�C�C�D�� � ��&�&�A�
��� 5� 5� 5� 5�6�6�6��������+�+�-�-�C��	
��x�x�z�z�!��/����I���&-�C�O��I���s�B�B'c�P�|�|�����Sr)r?rrUs r�closez+TestAsyncExitStack.SyncAsyncExitStack.closes���%�%�d�k�k�m�m�4�4�4rc�P�|�|�����Sr)r?r5rUs r�	__enter__z/TestAsyncExitStack.SyncAsyncExitStack.__enter__s ���%�%�d�o�o�&7�&7�8�8�8rc�<�|�|j|���Sr)r?r'�r)�exc_detailss  r�__exit__z.TestAsyncExitStack.SyncAsyncExitStack.__exit__s���%�%�n�d�n�k�&B�C�C�CrN)r-r.r/�staticmethodr?rArCrGrrr�SyncAsyncExitStackr0s_������	�	�	�
��	�$	5�	5�	5�	9�	9�	9�	D�	D�	D�	D�	DrrI))rGz7return self.run_coroutine(self.__aexit__(*exc_details))�r?z	raise excrJ)r'zraise exc_details[1])r'zcb_suppress = cb(*exc_details)c���tj��|_tj|j��|�|jj��|�tjd��dSr)r�new_event_loopr4�set_event_loop�
addCleanuprArrUs r�setUpzTestAsyncExitStack.setUp(sX���*�,�,��	���t�y�)�)�)�����	��(�(�(�����5�t�<�<�<�<�<rc	��n�K�difdifdifdtd���fdtd���fdtd���fg}g��fd�}t��4�d{V��}t|��D]h\}}|r|r|j|g|�Ri|��}n7|r|j|g|�R�}n&|r|j|fi|��}n|�|��}|�||���i|jD]o}|�|dj|��|�|dj|j��|�	|dj
|j
���p	ddd���d{V��n#1�d{V��swxYwY|��|��g�t��4�d{V��}|�t��5|�d���ddd��n#1swxYwY|�t��5|j�d���ddd��n#1swxYwY|�t��5|�|d	�
��ddd��n#1swxYwYddd���d{V��n#1�d{V��swxYwY|��g��dS)Nr)rp)rprrp)�examplec��:�K���||f��dS)zTest metadata propagationNrs)rr�r<s  �r�_exitz5TestAsyncExitStack.test_async_callback.<locals>._exit9s#������M�M�4��,�'�'�'�'�'r)�argr�)�callbackrT)�dictr�reversed�push_async_callbackr4�_exit_callbacks�__wrapped__�assertNotEqualr-�assertIsNoner�rDrBrO�
exit_stack)	r)�expectedrS�stackrr�r�rr<s	        @r�test_async_callbackz&TestAsyncExitStack.test_async_callback.s1�������H�
�2�J�
�B�K�
��a����!�
�4��?�?�?�#�
�D��O�O�O�$�

����	(�	(�	(�	(�	(�"�#�#�	E�	E�	E�	E�	E�	E�	E�u�&�x�0�0�	
(�	
(�
��d��9�D�9�1��1�%�G�$�G�G�G�$�G�G�A�A��9�1��1�%�?�$�?�?�?�A�A��9�1��1�%�@�@�4�@�@�A�A��1�1�%�8�8�A��
�
�a��'�'�'�'� �0�
E�
E���
�
�g�a�j�4�e�<�<�<��#�#�G�A�J�$7���H�H�H��!�!�'�!�*�"4�e�m�D�D�D�D�
E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E� 	
�����*�*�*���!�#�#�	A�	A�	A�	A�	A�	A�	A�u��"�"�9�-�-�
1�
1��)�)�a�)�0�0�0�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1�
1����
1�
1�
1�
1��"�"�9�-�-�
;�
;���3�3��3�:�:�:�
;�
;�
;�
;�
;�
;�
;�
;�
;�
;�
;����
;�
;�
;�
;��"�"�9�-�-�
A�
A��)�)�5�a�)�@�@�@�
A�
A�
A�
A�
A�
A�
A�
A�
A�
A�
A����
A�
A�
A�
A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A����	A�	A�	A�	A�	
�����$�$�$�$�$s��C0E � 
E*�-E*�J�8G�J�G	�J�"G	�#J�H(�J�(H,	�,J�/H,	�0J�
I1�%J�1I5	�5J�8I5	�9J�
J�Jc����K�t���fd�}d�}�fd�}Gd�dt��}����4�d{V��}|�|����|jdd|��||��}|�|����|jddj|��|�|����|jdd|��||��}|�|����|jddj|��|�|����|jdd|��|�|����|jdd|��ddzddd���d{V��dS#1�d{V��swxYwYdS)	Nc��8�K���|���dSr)r4)rWrF�exc_tb�
exc_raisedr)s   ��r�_expect_excz7TestAsyncExitStack.test_async_push.<locals>._expect_exc\s!������M�M�(�J�/�/�/�/�/rc��
K�dS�NTr)rFs r�
_suppress_excz9TestAsyncExitStack.test_async_push.<locals>._suppress_exc^s�����4rc���K���|����|����|��dSr)r])rWrFrdr)s   �r�
_expect_okz6TestAsyncExitStack.test_async_push.<locals>._expect_ok`sI��������h�'�'�'����c�"�"�"����f�%�%�%�%�%rc� �eZdZd�Zd�Zd�ZdS)�2TestAsyncExitStack.test_async_push.<locals>.ExitCMc��||_dSr��	check_exc)r)rps  r�__init__z;TestAsyncExitStack.test_async_push.<locals>.ExitCM.__init__es
��!*����rc��4K�|�d��dS)NzShould not be called!)r�rUs rr5z=TestAsyncExitStack.test_async_push.<locals>.ExitCM.__aenter__gs�����	�	�1�2�2�2�2�2rc��*K�|j|��d{V��dSrrorEs  rr'z<TestAsyncExitStack.test_async_push.<locals>.ExitCM.__aexit__is-����$�d�n�k�2�2�2�2�2�2�2�2�2�2rN)r-r.r/rqr5r'rrr�ExitCMrmdsA������
+�
+�
+�
3�
3�
3�
3�
3�
3�
3�
3rrtr(rpr)r}r	r^�push_async_exitr4rZ�__self__)r)rfrirkrtr`�cmres`      @r�test_async_pushz"TestAsyncExitStack.test_async_pushYs�������&�
�	0�	0�	0�	0�	0�	0�	�	�	�	&�	&�	&�	&�	&�	3�	3�	3�	3�	3�V�	3�	3�	3��?�?�$�$�	�	�	�	�	�	�	���!�!�*�-�-�-��M�M�%�/��3�A�6�
�C�C�C���
�#�#�B��!�!�"�%�%�%��M�M�%�/��3�A�6�?��D�D�D��!�!�-�0�0�0��M�M�%�/��3�A�6�
�F�F�F����$�$�B��!�!�"�%�%�%��M�M�%�/��3�A�6�?��D�D�D��!�!�+�.�.�.��M�M�%�/��3�A�6��D�D�D��!�!�+�.�.�.��M�M�%�/��3�A�6��D�D�D�
�a�C�C�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�FG(�(
G2�5G2c����K�G�fd�dt��}g�|��}t��4�d{V��}|j�fd���}|�|��|�|���d{V��|�|jddj|����d��ddd���d{V��n#1�d{V��swxYwY|�	�gd���dS)Nc�$��eZdZ�fd�Z�fd�ZdS)�;TestAsyncExitStack.test_enter_async_context.<locals>.TestCMc��6�K���d��dSr�rs)r)r<s �rr5zFTestAsyncExitStack.test_enter_async_context.<locals>.TestCM.__aenter__��������
�
�a� � � � � rc��6�K���d��dS)NrUrs)r)rFr<s  �rr'zETestAsyncExitStack.test_enter_async_context.<locals>.TestCM.__aexit__�r}rNrZ�r<s�r�TestCMr{sG�������
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!rr�c��6�K���d��dS)N�rsrs�rrSz:TestAsyncExitStack.test_enter_async_context.<locals>._exit�s������
�
�a� � � � � rr(rpr)rprrUr�)
r	rrY�assertIsNotNone�enter_async_contextr4rZrvrCrD)r)r�rwr`rSr<s     @r�test_enter_async_contextz+TestAsyncExitStack.test_enter_async_context}s������	!�	!�	!�	!�	!�	!�	!�V�	!�	!�	!���
�V�X�X��!�#�#�	�	�	�	�	�	�	�u�
�
&�
!�
!�
!�
!�'�
&�
!�� � ��'�'�'��+�+�B�/�/�/�/�/�/�/�/�/��M�M�%�/��3�A�6�?��D�D�D��M�M�!����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�������.�.�.�.�.s�BC�
C�Cc��K�Gd�d��}Gd�d��}Gd�d��}|���4�d{V��}|�td��5|�|�����d{V��ddd��n#1swxYwY|�td��5|�|�����d{V��ddd��n#1swxYwY|�td��5|�|�����d{V��ddd��n#1swxYwY|�|j��ddd���d{V��dS#1�d{V��swxYwYdS)Nc��eZdZdS)�MTestAsyncExitStack.test_enter_async_context_errors.<locals>.LacksEnterAndExitNrLrrr�LacksEnterAndExitr��rNrr�c��eZdZd�ZdS)�FTestAsyncExitStack.test_enter_async_context_errors.<locals>.LacksEnterc��
K�dSrr)r)�exc_infos  rr'zPTestAsyncExitStack.test_enter_async_context_errors.<locals>.LacksEnter.__aexit__�������rNrerrr�
LacksEnterr���#������
�
�
�
�
rr�c��eZdZd�ZdS)�ETestAsyncExitStack.test_enter_async_context_errors.<locals>.LacksExitc��
K�dSrrrUs rr5zPTestAsyncExitStack.test_enter_async_context_errors.<locals>.LacksExit.__aenter__�r�rNrarrr�	LacksExitr��r�rr��asynchronous context manager)r^r�rOr�rirZ)r)r�r�r�r`s     r�test_enter_async_context_errorsz2TestAsyncExitStack.test_enter_async_context_errors�s?����	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	��?�?�$�$�	4�	4�	4�	4�	4�	4�	4���'�'�	�3Q�R�R�
E�
E��/�/�0A�0A�0C�0C�D�D�D�D�D�D�D�D�D�
E�
E�
E�
E�
E�
E�
E�
E�
E�
E�
E����
E�
E�
E�
E��'�'�	�3Q�R�R�
>�
>��/�/�
�
���=�=�=�=�=�=�=�=�=�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>����
>�
>�
>�
>��'�'�	�3Q�R�R�
=�
=��/�/�	�	���<�<�<�<�<�<�<�<�<�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=����
=�
=�
=�
=����U�2�3�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�	4�	4s~�E4� $B�E4�B	�E4�B	�E4�6$C&�E4�&C*	�*E4�-C*	�.E4�$D<�0E4�<E	�E4�E	�E4�4
E>�E>c��\�K�d�}d��fd�}	|���4�d{V��}|�|t��|�|t��|�|t��|�|��|�|t��ddzddd���d{V��n#1�d{V��swxYwY|�d��n�#t$rs}|�|j	t��|�|j	j	t��|�
|j	j	j	��Yd}~nd}~wwxYw�d}|�|t��|�|j	t��dS)Nc��
K�|�rrr�s r�	raise_exczHTestAsyncExitStack.test_async_exit_exception_chaining.<locals>.raise_exc�s�����Irc���K�|�dSrhr)rF�
saved_detailss �r�suppress_exczKTestAsyncExitStack.test_async_exit_exception_chaining.<locals>.suppress_exc�s�����'�M��4rrpr�0Expected IndexError, but no exception was raised)r^rY�
IndexError�KeyError�AttributeErrorrurAr��assertIsInstancer=r]r})r)r�r�r`rF�	inner_excr�s      @r�"test_async_exit_exception_chainingz5TestAsyncExitStack.test_async_exit_exception_chaining�sJ�����	�	�	��
�	�	�	�	�	�
	J����(�(�
�
�
�
�
�
�
�E��)�)�)�Z�@�@�@��)�)�)�X�>�>�>��)�)�)�^�D�D�D��%�%�l�3�3�3��)�)�)�Z�@�@�@��A���

�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�I�I�H�I�I�I�I��
�	G�	G�	G��!�!�#�/�8�<�<�<��!�!�#�/�"=�~�N�N�N����c�o�9�E�F�F�F�F�F�F�F�F�����		G����"�!�$�	����i��4�4�4����i�3�5F�G�G�G�G�Gs<�C)�BC�0C)�
C�C)�C�C)�)
E&�3A)E!�!E&c������K�Gd�dt���t�fd����t��fd���}�|fD]�}����5	|��4�d{V��t���#1�d{V��swxYwY	��d��n,#�$r$}��|j��Yd}~nd}~wwxYwddd��n#1swxYwY��dS)Nc��eZdZdS)�WTestAsyncExitStack.test_async_exit_exception_explicit_none_context.<locals>.MyExceptionNrLrrr�MyExceptionr��rNrr�c�f�K�	dWV�dS#t$r���}	|�#d|_wxYwwxYwr)�
BaseExceptionr=)rFr�s �r�my_cmzQTestAsyncExitStack.test_async_exit_exception_explicit_none_context.<locals>.my_cm�s_�����
+��������� �
+�
+�
+�!�k�m�m��+��I��&*�C�O�*�*�*�*�
+���s��0�#�	,�0c���K�����4�d{V��}|�������d{V��|WV�ddd���d{V��dS#1�d{V��swxYwYdSr)r^r�)r`r�r)s ��r�my_cm_with_exit_stackzaTestAsyncExitStack.test_async_exit_exception_explicit_none_context.<locals>.my_cm_with_exit_stack�s	��������(�(�
�
�
�
�
�
�
�E��/�/�����8�8�8�8�8�8�8�8�8������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�)A�
A$�'A$r�)r�rr�r�r�r]r=)r)r�rwrFr�r�s`   @@r�/test_async_exit_exception_explicit_none_contextzBTestAsyncExitStack.test_async_exit_exception_explicit_none_context�s�������
	�	�	�	�	�)�	�	�	�
�	+�	+�	+�	+�
�	�	+�
�	�	�	�	�	�
�	�	�
�/�0�	R�	R�B������
R�
R�R�!�r�t�t�+�+�+�+�+�+�+�+�(�l�l�*�+�+�+�+�+�+�+�+�+�+����+�+�+�+�+�
�I�I�P�Q�Q�Q�Q��#�7�7�7��%�%�c�o�6�6�6�6�6�6�6�6�����7����	
R�
R�
R�
R�
R�
R�
R�
R�
R�
R�
R����
R�
R�
R�
R��	R�	RsZ�C�B!�*A9�9
B�B!�B�B!�C�!C
�&C�C�C
�
C�C	� C	c���K�Gd�dt��}|��}t��|_t��|_|���}|�t
d��5|�|���d{V��ddd��n#1swxYwY|�|��|�|j	dd|��dS)Nc��eZdZdS)�>TestAsyncExitStack.test_instance_bypass_async.<locals>.ExampleNrLrrr�Exampler��s�������rr�r�r(rp)
r	r5r'r^r�rOr�rur4rZ)r)r�rwr`s    r�test_instance_bypass_asyncz-TestAsyncExitStack.test_instance_bypass_async�s����#�#�#�#�#�f�#�#�#�
�W�Y�Y������
��x�x������!�!��
�
#�
#�I�/M�
N�
N�	0�	0��+�+�B�/�/�/�/�/�/�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�
���b�!�!�!��
�
�e�+�B�/��2�B�7�7�7�7�7s�5B�B!�$B!N)r-r.r/rrIr^�callback_error_internal_framesrOrrarxr�r�r�r�r�rrrr.r.s4������D�D�D�D�D�^�D�D�D�:$�J�&�&�&�"�=�=�=��(%�(%��[�(%�T�!�!��[�!�F�/�/��[�/�*�4�4��[�4�&�H�H��[�H�>� R� R��[� R�D�	8�	8��[�	8�	8�	8rr.c�$�eZdZed���ZdS)�TestAsyncNullcontextc���K�Gd�d��}|��}t|��4�d{V��}|�||��ddd���d{V��dS#1�d{V��swxYwYdS)Nc��eZdZdS)�6TestAsyncNullcontext.test_async_nullcontext.<locals>.CNrLrrrrr��rNrr)rr4)r)rr�c_ins    r�test_async_nullcontextz+TestAsyncNullcontext.test_async_nullcontext�s����	�	�	�	�	�	�	�	�
�A�C�C���q�>�>�	#�	#�	#�	#�	#�	#�	#�T��M�M�$��"�"�"�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#�	#�	#s�A�
A#�&A#N)r-r.r/rr�rrrr�r��s-�������#�#��[�#�#�#rr��__main__)r�
contextlibrrrrrrrr�r	�unittestrY�test.test_contextlibr
�requires_working_socketrr�TestCaser rlr
r.r�r-�mainrrr�<module>r�s������;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�������������������2�2�2�2�2�2����t�,�,�,�,����(�(�(�BM�BM�BM�BM�BM�h�&7�BM�BM�BM�Jc$�c$�c$�c$�c$�(�"3�c$�c$�c$�L9%�9%�9%�9%�9%�x�(�9%�9%�9%�xs8�s8�s8�s8�s8�*�H�,=�s8�s8�s8�l#�#�#�#�#�8�,�#�#�#��z����H�M�O�O�O�O�O��r