Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_coroutines.cpython-312.opt-1.pyc

�

'Μg�
���ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlmZGd�d�ZGd�d	�Zd
�Zd�Zd�Zej*d
��ZGd�dej.�ZGd�dej.�ZGd�dej.�Zej6e
j8xse
j:d�Gd�dej.��ZGd�dej.�ZGd�dej.�Z e
jBGd�dej.��Z"e#dk(rejH�yy)�N)�support)�
import_helper)�warnings_helper��assert_python_okc��eZdZd�Zd�Zy)�AsyncYieldFromc��||_y�N��obj)�selfr
s  �1/usr/local/lib/python3.12/test/test_coroutines.py�__init__zAsyncYieldFrom.__init__s	�����c#�8K�|jEd{���y7��wrr�rs r�	__await__zAsyncYieldFrom.__await__s�����8�8���s���N��__name__�
__module__�__qualname__rr�rrr	r	s���rr	c��eZdZd�Zd�Zy)�
AsyncYieldc��||_yr��value)rrs  rrzAsyncYield.__init__s	����
rc#�(K�|j��y�wrrrs rrzAsyncYield.__await__s�����j�j��s�Nrrrrrrs���rrc�$K�|D]}|����	y�w)z0Convert an iterable to an asynchronous iterator.Nr)�iterable�xs  r�	asynciterr# s����
�������c��g}d}		|j|jd���"#t$r*}|jr|jdnd}Yd}~||fSd}~wwxYw�Nr)�append�send�
StopIteration�args)�coro�buffer�result�exs    r�	run_asyncr/&sc���F�
�F�
�	��M�M�$�)�)�D�/�*����	�#%�7�7�R�W�W�Q�Z��F���6�>���	�s� (�	A�A�Ac�*�|j�}g}d}d}		|dzr|jt|��n |j|jd��|dz
}�G#t$r*}|j
r|j
dnd}Yd}~||fSd}~wwxYw)Nr��)rr'�nextr(r)r*)r+�awr,r-�ir.s      r�run_async__await__r64s���	
���	�B�
�F�
�F�	�A�
�	��1�u��
�
�d�2�h�'��
�
�b�g�g�d�m�,�
��F�A�
���	�#%�7�7�R�W�W�Q�Z��F���6�>���	�s�AA�	B�(B
�
Bc#�K�tj�5tjd�d��tj�ddd�y#1swYyxYw�w)N�ignore)�warnings�catch_warnings�simplefilterr�
gc_collectrrr�silence_coro_gcr=Gs:����	�	 �	 �	"����h�'�
�����
#�	"�	"�s�A�.A�	A�A�Ac�$�eZdZd�Zd�Zd�Zd�Zy)�AsyncBadSyntaxTestc���gd�}|D]H}|j|��5|jt�5t|dd�ddd�ddd��Jy#1swY�xYw#1swY�axYw)N)>z9def foo():
                await something()
            zawait something()z;async def foo():
                yield from []
            z=async def foo():
                await await fut
            zEasync def foo(a=await something()):
                pass
            zEasync def foo(a:await something()):
                pass
            z`async def foo():
                def bar():
                 [i async for i in els]
            z`async def foo():
                def bar():
                 [await i for i in els]
            z�async def foo():
                def bar():
                 [i for i in els
                    async for b in els]
            z�async def foo():
                def bar():
                 [i for i in els
                    for c in b
                    async for b in els]
            z�async def foo():
                def bar():
                 [i for i in els
                    async for b in els
                    for c in b]
            zkasync def foo():
                def bar():
                 [[async for i in b] for b in els]
            z�async def foo():
                def bar():
                 [i for i in els
                    for b in await els]
            z�async def foo():
                def bar():
                 [i for i in els
                    for b in els
                        if await b]
            z`async def foo():
                def bar():
                 [i for i in await els]
            zeasync def foo():
                def bar():
                 [i for i in els if await i]
            z?def bar():
                 [i async for i in els]
            zBdef bar():
                 {i: i async for i in els}
            z?def bar():
                 {i async for i in els}
            z?def bar():
                 [await i for i in els]
            z`def bar():
                 [i for i in els
                    async for b in els]
            zdef bar():
                 [i for i in els
                    for c in b
                    async for b in els]
            zdef bar():
                 [i for i in els
                    async for b in els
                    for c in b]
            z`def bar():
                 [i for i in els
                    for b in await els]
            z}def bar():
                 [i for i in els
                    for b in els
                        if await b]
            z?def bar():
                 [i for i in await els]
            zDdef bar():
                 [i for i in els if await i]
            zMdef bar():
                 [[i async for i in a] for a in elts]
            z1[[i async for i in a] for a in elts]
            z3async def foo():
                await
            z]async def foo():
                   def bar(): pass
                   await = 1
            z^async def foo():

                   def bar(): pass
                   await = 1
            zzasync def foo():
                   def bar(): pass
                   if 1:
                       await = 1
            zxdef foo():
                   async def bar(): pass
                   if 1:
                       await a
            z[def foo():
                   async def bar(): pass
                   await a
            z~def foo():
                   def baz(): pass
                   async def bar(): pass
                   await a
            z�def foo():
                   def baz(): pass
                   # 456
                   async def bar(): pass
                   # 123
                   await a
            z�async def foo():
                   def baz(): pass
                   # 456
                   async def bar(): pass
                   # 123
                   await = 2
            z�def foo():

                   def baz(): pass

                   async def bar(): pass

                   await a
            z�async def foo():

                   def baz(): pass

                   async def bar(): pass

                   await = 2
            zBasync def foo():
                   def async(): pass
            zBasync def foo():
                   def await(): pass
            zXasync def foo():
                   def bar():
                       await
            zKasync def foo():
                   return lambda async: await
            zGasync def foo():
                   return lambda a: await
            z	await a()z>async def foo(a=await b):
                   pass
            z>async def foo(a:await b):
                   pass
            z`def baz():
                   async def foo(a=await b):
                       pass
            z:async def foo(async):
                   pass
            z�async def foo():
                   def bar():
                        def baz():
                            async = 1
            z�async def foo():
                   def bar():
                        def baz():
                            pass
                        async = 1
            z�def foo():
                   async def bar():

                        async def baz():
                            pass

                        def baz():
                            42

                        async = 1
            z�async def foo():
                   def bar():
                        def baz():
                            pass
await foo()
            z�def foo():
                   def bar():
                        async def baz():
                            pass
await foo()
            z:async def foo(await):
                   pass
            z]def foo():

                   async def bar(): pass

                   await a
            z`def foo():
                   async def bar():
                        pass
await a
            z`def foo():
                   async for i in arange(2):
                       pass
            z[def foo():
                   async with resource:
                       pass
            z9async with resource:
                   pass
            z>async for i in arange(2):
                   pass
            ��code�<test>�exec��subTest�assertRaises�SyntaxError�compile�r�samplesrBs   r�test_badsyntax_1z#AsyncBadSyntaxTest.test_badsyntax_1QsX��~��@
�D����4��(�$�*;�*;�K�*H���h��/�+I�(�(��*H�*H��(�(��"�A�A�A�A�A�A(	c���gd�}|D]H}|j|��5|jt�5t|dd�ddd�ddd��Jy#1swY�xYw#1swY�axYw)N)	z1def foo():
                await = 1
            z9class Bar:
                def async(): pass
            z1class Bar:
                async = 1
            z.class async:
                pass
            z.class await:
                pass
            zimport math as awaitz!def async():
                passz2def foo(*, await=1):
                passasync = 1zprint(await=1)rArCrDrErJs   r�test_badsyntax_2z#AsyncBadSyntaxTest.test_badsyntax_2�sW�� 
��D�D����4��(�$�*;�*;�K�*H���h��/�+I�(�(��*H�*H��(�(�rMc�r�|jt�5tddd�ddd�y#1swYyxYw)Nz	async = 1rCrD)rGrHrIrs r�test_badsyntax_3z#AsyncBadSyntaxTest.test_badsyntax_3�s(��
�
�
�{�
+��K��6�2�,�
+�
+�s�-�6c���gd�}|D]H}|j|��5|jt�5t|dd�ddd�ddd��Jy#1swY�xYw#1swY�axYw)N)z�def foo(await):
                async def foo(): pass
                async def foo():
                    pass
                return await + 1
            z�def foo(await):
                async def foo(): pass
                async def foo(): pass
                return await + 1
            z�def foo(await):

                async def foo(): pass

                async def foo(): pass

                return await + 1
            z�def foo(await):
                """spam"""
                async def foo():                     pass
                # 123
                async def foo(): pass
                # 456
                return await + 1
            a:def foo(await):
                def foo(): pass
                def foo(): pass
                async def bar(): return await_
                await_ = await
                try:
                    bar().send(None)
                except StopIteration as ex:
                    return ex.args[0] + 1
            rArCrDrErJs   r�test_badsyntax_4z#AsyncBadSyntaxTest.test_badsyntax_4�sW��+
��Z�D����4��(�$�*;�*;�K�*H���h��/�+I�(�(��*H�*H��(�(�rMN)rrrrLrOrQrSrrrr?r?Os��C0�J
%0�N3�00rr?c��eZdZd�Zy)�TokenizerRegrTestc��g}td�D]#}|jdj|����%dj|�}i}t	|||�|j|d�d�|dz
}i}t	|||�|j|d�d�|j
tj|d��y)	Ni�zdef i{i}(): return {i}�r5�
�i499i�z
async def foo():
    return�foo)	�ranger'�format�joinrD�assertEqual�
assertTrue�inspect�iscoroutinefunction)r�bufr5�nss    r�test_oneline_defsz#TokenizerRegrTest.test_oneline_defs�s������s��A��J�J�/�6�6��6�;�<���i�i��n�����S�"�b�������F���s�+�	�/�/��
���S�"�b�������F���s�+�����3�3�B�u�I�>�?rN)rrrrdrrrrUrU�s��@rrUc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdM�ZOdN�ZPdO�ZQdP�ZRdQ�ZSdR�ZTdS�ZUdT�ZVyU)V�
CoroutineTestc�@�d�}|jt|d��y)Nc3�K�d��y�wrrrrr�genz%CoroutineTest.test_gen_1.<locals>.gen
s����5���r)�assertFalse�hasattr)rris  r�
test_gen_1zCoroutineTest.test_gen_1s��������k�2�3rc�R�d�}|�}|j|tj�|jt	|j
jtjz��|jt	|j
jtjz��|jt	|jjtjz��|jt	|jjtjz��|jt|�gdf�|jt|��gdf�d�}|jt	|j
jtjz��y)Nc��K�y�w�N�
rrrrrZz&CoroutineTest.test_func_1.<locals>.foo�	�������rqc��yrrrrr�barz&CoroutineTest.test_func_1.<locals>.bars��4r)�assertIsInstance�types�
CoroutineTyper_�bool�__code__�co_flagsr`�CO_COROUTINErk�CO_GENERATOR�cr_coder^r/r6�rrZ�frus    r�test_func_1zCoroutineTest.test_func_1s!��	�
�E�����a��!4�!4�5�����S�\�\�2�2�W�5I�5I�I�J�K�����c�l�l�3�3�g�6J�6J�J�K�L�����Q�Y�Y�/�/�'�2F�2F�F�G�H�����a�i�i�0�0�7�3G�3G�G�H�I�����1���B�x�0����+�C�E�2�R��H�=������c�l�l�3�3�g�6J�6J�J�K�Lrc��d�}|jtd�5t|��ddd�y#1swYyxYw)Nc��K�t��wr�r)rrrrZz&CoroutineTest.test_func_2.<locals>.foo"���������	zcoroutine raised StopIteration)�assertRaisesRegex�RuntimeErrorr/�rrZs  r�test_func_2zCoroutineTest.test_func_2!s=��	 ��
#�
#��>�@�
�c�e��@�@�@���4�=c�n�d�}|�}|jt|�d�|j�y)Nc��K�t��wrr�rrrrZz&CoroutineTest.test_func_3.<locals>.foo+r�r�z^<coroutine object.* at 0x.*>$)�assertRegex�repr�close)rrZr+s   r�test_func_3zCoroutineTest.test_func_3*s.��	 ��u������d��%E�F��
�
�rc�&��d�}|�}�fd�}|�5t|�ddd�|�5t|�ddd�|�5t|�ddd�|�5t|�ddd�|�5|D]}�	ddd�|�5|D�cgc]}|��c}ddd�|j	�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY�vxYw#1swY�jxYwcc}w#1swY�[xYw)Nc��K�t��wrr�rrrrZz&CoroutineTest.test_func_4.<locals>.foo3r�r�c�0���jtd�S�Nz"'coroutine' object is not iterable�r��	TypeErrorrs�r�<lambda>z+CoroutineTest.test_func_4.<locals>.<lambda>7�����.�.��;�=r)�list�tuple�sum�iterr�)rrZr+�checkr5s`    r�test_func_4zCoroutineTest.test_func_42s����	 ��u��=���W���J���W��$�K���W���I���W���J���W�������W����1�Q����	
�
�
��'�W���W���W���W���W��

��W�sX�C�C�C�)C*�C6�D�!	D�*D�C�C�C'�*C3�6C?�D�Dc�����tjd����fd�}�fd�}|�}|�5|D]}�	ddd�|j���D]}�j|d���j��D�cgc]}|��c}dg��jt	���d��jtt
����d�y#1swY��xYwcc}w)Nc3�K�d��y�w�Nr2rrrrruz&CoroutineTest.test_func_5.<locals>.barPs�����G�rjc��0�K����d{���y7��wrr�rus�rrZz&CoroutineTest.test_func_5.<locals>.fooT�������%�K�K�����c�0���jtd�Sr�r�rs�rr�z+CoroutineTest.test_func_5.<locals>.<lambda>Wr�rr2�r2)rw�	coroutiner�r^r�r3r�)rrZr�r+�elrus`    @r�test_func_5zCoroutineTest.test_func_5Os����	���	�
�	�	�=���u��
�W������	
�
�
���%�B����R��#�����s�u�-�u��"�u�-��s�3�����s�u��t�,�����d�3�5�k�*�A�.��W��.s�C �	C,� C)c�D��tjd����fd�}|�}|j|jd�d�|j|jd�d�|j	t
�5|jd�ddd�y#1swYyxYw)Nc3�K�d��d��y�w�Nr2r1rrrrruz&CoroutineTest.test_func_6.<locals>.barhs�����G��G�s�
c��0�K����d{���y7��wrrr�s�rrZz&CoroutineTest.test_func_6.<locals>.foomr�r�r2r1)rwr�r^r(rGr)rs   @r�test_func_6zCoroutineTest.test_func_6gs|���	���	�
�	�	�
�E����������q�)���������q�)�
�
�
�}�
-�
�F�F�4�L�.�
-�
-�s�;B�Bc���d�}|���fd�}|jtd�5t|��ddd��j�y#1swY�xYw)Nc��K�y�wrprrrrruz&CoroutineTest.test_func_7.<locals>.barwrrrsc3�&�K��Ed{���y7��wrr�r+s�rrZz&CoroutineTest.test_func_7.<locals>.foo{s������O�O�s���zCcannot 'yield from' a coroutine object in a non-coroutine generator)r�r�r�r��rrurZr+s   @r�test_func_7zCoroutineTest.test_func_7vsR���	��u��	��
#�
#��,�-�
���K�	-�	
�
�
��
-�-�s�A�Ac���tj�fd��}d�}|��|jt|��gdf��j	�y)Nc3�$�K��Ed{���S7��wrrr�s�rruz&CoroutineTest.test_func_8.<locals>.bar�s�����#�O�$�O�s���c��K�y�w�N�spamrrrrrZz&CoroutineTest.test_func_8.<locals>.foo��	�����rsr�)rwr�r^r/r�r�s   @r�test_func_8zCoroutineTest.test_func_8�sK���	���	%�
�	%�	��u������3�5�)�B��<�8��
�
�rc��d�}|jtd�5|�tj�ddd�|jtd�5|j	t
�5|�D]}�	ddd�tj�ddd�y#1swY�hxYw#1swY�2xYw#1swYyxYw)Nc��K�y�wrrrrrrZz&CoroutineTest.test_func_9.<locals>.foo��	�����rsz0coroutine '.*test_func_9.*foo' was never awaited)�assertWarnsRegex�RuntimeWarningrr<rGr�)rrZ�_s   r�test_func_9zCoroutineTest.test_func_9�s���	��
"�
"��C�E�
�E���� �E��
"�
"��C�E��"�"�9�-���A���.�

��� �E�E�E�E��.�-��	E�E�s/�B�B5�*
B)�8B5�B&�)B2	�.B5�5B>c����d�tj�fd����fd�}|�}|j�}|j|t	|��t|�|j
|jd�d�|j
�d�|j�|j
�d�|�}|j�}t|�|jt�5|jt��ddd�|j
�d�|�}|j�}t|�|jt�5|jt�5|jtt�d�ddd�ddd�y#1swY��xYw#1swY�xYw#1swYyxYw)Nrc3�l�K�	d��}|dz��	�dz
�y#t$r�dz
��wxYw#�dz
�wxYw�w)Nr1�dr2��ZeroDivisionError)�a�Ns �rriz'CoroutineTest.test_func_10.<locals>.gen�sM�����
����A�v��
�Q����	%�
��S����
���Q���s�4��4�'�*�1�4c��0�K����d{���y7��wrr�ris�rrZz'CoroutineTest.test_func_10.<locals>.foo�r�r�rqr�r2�f)rwr�r�assertIsr�r3r^r(r�rGr��throw�assertWarns�DeprecationWarning)rrZr+r4r�ris    @@r�test_func_10zCoroutineTest.test_func_10�sU���
��	���		�
�		�	��u��
�^�^�
���
�
�b�$�r�(�#��R����������c�*�����A��
���
�����A���u��
�^�^�
���R��
�
�
�0�
1��H�H�&�(�)�2�����C� ��u��
�^�^�
���R��
�
�
�0�
1��!�!�"4�5����*�,=�,?��F�6�2�
1�2�
1��6�5��2�
1�s0�+F�F5�, F)�F5�F&�)F2	�.F5�5F>c��d�}|�}|jdt|��|jdt|j���|jdt|j���|j	�y)Nc��K�y�wrrrrr�funcz(CoroutineTest.test_func_11.<locals>.func������$�rsr�__iter__�coroutine_wrapper)�assertIn�dirrr�r�)rr�r+s   r�test_func_11zCoroutineTest.test_func_11�s^����v��	
�
�
�k�3�t�9�-��
�
�j�#�d�n�n�&6�"7�8��
�
�)�4����0@�+A�B��
�
�rc����fd�}|��|jtd�5�jd�ddd�y#1swYyxYw)Nc��P�K��jd�}t�d{���y7��wr)r(rZ)r5�mes �r�gz%CoroutineTest.test_func_12.<locals>.g�s���������
�A��I�I�s�&�$�&zcoroutine already executing)r��
ValueErrorr()rr�r�s  @r�test_func_12zCoroutineTest.test_func_12�sC���	��S��
�
#�
#�J�$A�C��G�G�D�M�C�C�C�s	�?�Ac��d�}|�}|jtd�5|jd�ddd�|j�y#1swY�xYw)Nc��K�y�wrrrrrr�z%CoroutineTest.test_func_13.<locals>.g�r�rsz5can't send non-None value to a just-started coroutiner�)r�r�r(r�)rr�r+s   r�test_func_13zCoroutineTest.test_func_13�sQ��	��s��
�
#�
#��G�I�
�I�I�f��I�
	
�
�
��I�I�s�A�Ac����tjd����fd�}|�}|jd�|jtd�5|j�ddd�y#1swYyxYw)Nc3�K�d��y�wrrrrrriz'CoroutineTest.test_func_14.<locals>.gen��	�����rjc��p�K�	���d{���y7�#t$r���d{���7YywxYw�wr��
GeneratorExitr�s�rr+z(CoroutineTest.test_func_14.<locals>.coro�s,�����
��e���� �
��e���
�s0�6�
���6��3�-�3�6�3�6zcoroutine ignored GeneratorExit)rwr�r(r�r�r�)rr+�cris   @r�test_func_14zCoroutineTest.test_func_14�sb���	���	�
�	�	�

�F��	���t��
�
#�
#�L�$E�G�
�G�G�I�G�G�G�s�A%�%A.c�&�d�}d�}|�}|jtd�5||�jd�ddd�|jtd�5||�jd�ddd�y#1swY�@xYw#1swYyxYw)Nc��K�y�wr�rrrr�spammerz+CoroutineTest.test_func_15.<locals>.spammerr�rsc��"K�|�d{���S7��wrrr�s r�readerz*CoroutineTest.test_func_15.<locals>.readers�����:��:�s��
�r��&cannot reuse already awaited coroutine)r�r)r(r�)rr�r��spammer_coros    r�test_func_15zCoroutineTest.test_func_15s���	�	��y��
�
#�
#�M�6�
:��<� �%�%�d�+�;��
#�
#�L�$L�N��<� �%�%�d�+�N�N�;�
:��N�N�s�A;�B�;B�Bc�f��tjd����fd�}�fd�}|�}||�}|jd�|jd�|jtd�5|jt	d��ddd�||�}|jd�|jtd�5|jd�ddd�|jtd�5|jt	d��ddd�y#1swY��xYw#1swY�OxYw#1swYyxYw)Nc3�K�d��y�wrrrrr�nopz'CoroutineTest.test_func_16.<locals>.nopr�rjc��0�K����d{���y7��wr�r�r�s�rr(z(CoroutineTest.test_func_16.<locals>.sends������%�K�K��
�r�c��F�K����d{���|�d{���S7�7��wrr)r+r�s �r�readz(CoroutineTest.test_func_16.<locals>.reads!������%�K�K��:��
���s�!��	!��!�!�hamr��wat)rwr�r(r��	Exceptionr�r�)rr(r�r�r�r�s     @r�test_func_16zCoroutineTest.test_func_16s���
���	�
�	�	�	��&���g������D�����D��
�
#�
#�I�u�
5��L�L��5�)�*�6��g������D��
�
#�
#�L�$L�N��K�K���N��
#�
#�L�$L�N��L�L��5�)�*�N�N�6�
5��
N�N��N�N�s$�)D�;D�+D'�D�D$�'D0c���d�}|�}|jtd�5|jd�ddd�|jtd�5|jd�ddd�|jtd�5|j	td��ddd�|j
�|j
�y#1swY��xYw#1swY�oxYw#1swY�BxYw)Nc��K�y�wr�rrrrr�z-CoroutineTest.test_func_17.<locals>.coroutine3r�rsr�r�r�)r�r)r(r�r�r�r�)rr�r+s   r�test_func_17zCoroutineTest.test_func_170s���	��{��
�
#�
#�M�6�
:��I�I�d�O�;��
#�
#�L�$L�N��I�I�d�O�N��
#�
#�L�$L�N��J�J�y��'�(�N�	
�
�
���
�
��;�
:��N�N��N�N�s#�C�C�C�C�C�C&c��d�}|�}|j�}t|�}|jtd�5|j	d�ddd�|jt
d�5|j	d�ddd�|jt
d�5t
|�ddd�|jt
d�5|jtd��ddd�|jt
d�5|jtd��ddd�|j�|j�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�ZxYw)Nc��K�y�wr�rrrrr�z-CoroutineTest.test_func_18.<locals>.coroutineJr�rsr�r�r�)
rr�r�r)r(r�r3r�r�r�)rr�r+�
await_iter�its     r�test_func_18zCoroutineTest.test_func_18Gs=��	��{���^�^�%�
�
�*�
��
�
#�
#�M�6�
:��G�G�D�M�;��
#�
#�L�$L�N��G�G�D�M�N��
#�
#�L�$L�N�
��H�N��
#�
#�L�$L�N��H�H�Y�u�%�&�N��
#�
#�L�$L�N��H�H�Y�u�%�&�N�	���
�
���
�9;�
:��N�N��N�N��N�N��N�N�s;�E�,E�E�E'�?E3�E�E�E$�'E0�3E<c�d���d�tj�fd����fd�}|�}|jd�|jd�|j�d�|j	�|j�d�td�D]$}|j	�|j�d��&y)Nrc3�H�K�d��	d��y#t$r�dz
�YywxYw�wr�r�)�CHKs�rrZz'CoroutineTest.test_func_19.<locals>.foors+�����
�
��� �
��q���
�s�"��"��"��"c��0�K����d{���y7��wrr)rZs�rr�z-CoroutineTest.test_func_19.<locals>.coroutine{r�r�r2�)rwr�r(r^r�r[)rr�r+r�rrZs    @@r�test_func_19zCoroutineTest.test_func_19os������	���	�
�	�	��{���	�	�$���	�	�$������a� ��
�
������a� ��q��A�
�J�J�L����S�!�$�	rc�R�d�}t|��}|j|gdf�y)Nc��K�y�w)N�rqrrrrrZz7CoroutineTest.test_coro_wrapper_send_tuple.<locals>.foo�s	�����rsr)r6r^�rrZr-s   r�test_coro_wrapper_send_tuplez*CoroutineTest.test_coro_wrapper_send_tuple�s)��	�$�C�E�*������"�e��-rc��d�}t|��}|j|dt�|j|djd�y)Nc�� K�td�S�wrpr�rrrrZz?CoroutineTest.test_coro_wrapper_send_stop_iterator.<locals>.foo�s���� ��$�$���r2rq)r6rvr)r^rrs   r�$test_coro_wrapper_send_stop_iteratorz2CoroutineTest.test_coro_wrapper_send_stop_iterator�sA��	%�$�C�E�*�����f�Q�i��7���������"�-rc������tj��fd����fd�����fd�}|���jtj��tj
��j
�j��jd��jtj��tj��j�jjjjd��jt�5�jd�ddd��jtj��tj��j
�j�y#1swY�XxYw)Nc3�N�K��jtj��tj��j	�j
�d���jtj��tj��j	�j
�y�wr)r^r`�getcoroutinestate�CORO_RUNNING�assertIsNone�cr_await)�coro_brs��rr�z&CoroutineTest.test_cr_await.<locals>.a�sp��������W�6�6�v�>��@T�@T�U����f�o�o�.�����W�6�6�v�>��@T�@T�U����f�o�o�.�s�B"B%c��0�K����d{���y7��wrr)r�s�rr�z&CoroutineTest.test_cr_await.<locals>.c�s������#�I�I�r�c���K��j�j����d{����j�j�y7� �wr)rr)r�rrs���r�bz&CoroutineTest.test_cr_await.<locals>.b�s9��������f�o�o�.��#�I�I����f�o�o�.�
�s�&A�A
�!Ar�)rwr�r^r`r�CORO_CREATEDrrr(�CORO_SUSPENDED�gi_code�co_namerGr)�CORO_CLOSED)rr!r�r�rs` @@@r�
test_cr_awaitzCoroutineTest.test_cr_await�s
���	���	/�
�	/�	�	/�
�������2�2�6�:�G�<P�<P�Q����&�/�/�*����D������2�2�6�:�G�<R�<R�S�������1�1�9�9�A�A�3�G�
�
�
�}�
-��K�K���.�����2�2�6�:�G�<O�<O�P����&�/�/�*�.�
-�s�E;�;Fc�n�tj}tjs�|j	d|j
j�|j	d|jj�|j	d|jj�|j	d|jdj�|j	d|jdj�|j|jd�d�}|�}|j	d	t|��|j�y)
Nzinto coroutinezinside coroutinezin coroutinezof the coroutinerrr�c��K�y�wrrrrrr�z(CoroutineTest.test_corotype_1.<locals>.f�s����t�rszcoroutine object)
rwrxr�MISSING_C_DOCSTRINGSr�r(�__doc__r�r��__dict__r^rr�)r�ctr�r�s    r�test_corotype_1zCoroutineTest.test_corotype_1�s���
�
 �
 ���+�+��M�M�*�B�G�G�O�O�<��M�M�,�b�h�h�.>�.>�?��M�M�.�"�(�(�*:�*:�;��M�M�,�b�k�k�*�.E�.M�.M�N��M�M�,�b�k�k�.�.I�.Q�.Q�R�������k�2��
�C���
�
�(�$�q�'�2�	���	rc��d�}|jtd�5t|��ddd�y#1swYyxYw)Nc��$K�d�d{���y7��wr�rrrrrZz'CoroutineTest.test_await_1.<locals>.foo�s
�����G�G�����zobject int can.t.*await�r�r�r/r�s  r�test_await_1zCoroutineTest.test_await_1�s/��	�
�
#�
#�I�/H�
I��c�e��J�
I�
I�r�c��d�}|jtd�5t|��ddd�y#1swYyxYw)Nc��$K�g�d{���y7��wrrrrrrZz'CoroutineTest.test_await_2.<locals>.foo�s
�����H�H�r1zobject list can.t.*awaitr2r�s  r�test_await_2zCoroutineTest.test_await_2�s/��	�
�
#�
#�I�/I�
J��c�e��K�
J�
J�r�c��d�}|jt|��gd�df�|jt|��gd�df�y)Nc��:K�tgd���d{���y7��w�N�r2r1r
)r	rrrrZz'CoroutineTest.test_await_3.<locals>.foo�s���� ��+�+�+�s���r:)r^r/r6r�s  r�test_await_3zCoroutineTest.test_await_3�sB��	,�	
����3�5�)�I�t�+<�=����+�C�E�2�Y��4E�Frc�Z��d���fd�}|jt|��gdf�y)Nc��K�y�w�N�*rrrrruz'CoroutineTest.test_await_4.<locals>.bar�rrrsc��.�K����d{���S7��wrrr�s�rrZz'CoroutineTest.test_await_4.<locals>.foo�s�������;��;�����r?�r^r/)rrZrus  @r�test_await_4zCoroutineTest.test_await_4�s*���	�	�	
����3�5�)�B��8�4rc���Gd�d���fd�}|jtd�5t|��ddd�y#1swYyxYw)Nc��eZdZd�Zy)�-CoroutineTest.test_await_5.<locals>.Awaitablec��yrrrs rrz7CoroutineTest.test_await_5.<locals>.Awaitable.__await__�s��rN�rrrrrrr�	AwaitablerF�s��
rrIc��.�K����d{���S7��wrr�rIs�rrZz'CoroutineTest.test_await_5.<locals>.foo�������#�+�%�&�%�rA�(__await__.*returned non-iterator of typer2�rrZrIs  @r�test_await_5zCoroutineTest.test_await_5�sH���	�	�	'��
#�
#��A�C�
�c�e��C�C�C���A�A
c�j��Gd�d���fd�}|jt|��dgdf�y)Nc��eZdZd�Zy)�-CoroutineTest.test_await_6.<locals>.Awaitablec��tdg�S)N�4�r�rs rrz7CoroutineTest.test_await_6.<locals>.Awaitable.__await__�s���R�D�z�!rNrHrrrrIrS�s��
"rrIc��.�K����d{���S7��wrrrKs�rrZz'CoroutineTest.test_await_6.<locals>.foo�rLrArUrBrNs  @r�test_await_6zCoroutineTest.test_await_6�s1���	"�	"�	'�	
����3�5�)�R�D�$�<�8rc�j��Gd�d���fd�}|jt|��dgdf�y)Nc��eZdZd�Zy)�-CoroutineTest.test_await_7.<locals>.Awaitablec3�K�d��y�w)Nr?r�rrs rrz7CoroutineTest.test_await_7.<locals>.Awaitable.__await__�s�������rjNrHrrrrIr[�s��
rrIc��.�K����d{���S7��wrrrKs�rrZz'CoroutineTest.test_await_7.<locals>.foorLrAr?r�rBrNs  @r�test_await_7zCoroutineTest.test_await_7�s1���	�	�
	'�	
����3�5�)�R�D�#�;�7rc���Gd�d���fd�}|jtd�5t|��ddd�y#1swYyxYw)Nc��eZdZy)�-CoroutineTest.test_await_8.<locals>.AwaitableN�rrrrrrrIra	���rrIc��.�K����d{���S7��wrrrKs�rrZz'CoroutineTest.test_await_8.<locals>.foos�����i�k� 1�1� 1�rAz4object Awaitable can't be used in 'await' expressionr2rNs  @r�test_await_8zCoroutineTest.test_await_8sF���	�	�	2�
�
#�
#��M�O�
�c�e��O�O�O�rPc�����fd��d����fd�}�fd�}|jt|��gdf�|jt|��gdf�y)Nc����Srrr�s�r�wrapz(CoroutineTest.test_await_9.<locals>.wraps����Jrc��K�y�wr>rrrrruz'CoroutineTest.test_await_9.<locals>.barrrrsc��*�K�d�fd�i}G�fd�d�}���d{�������d{���z|d����d{���z���d{���dzz|j���d{���zS7�g7�V7�;7�-7��w)Nr!c����Srr�rhs�rr�z9CoroutineTest.test_await_9.<locals>.foo.<locals>.<lambda>s���rc���eZdZW�Zy)�3CoroutineTest.test_await_9.<locals>.foo.<locals>.DBN)rrrr!rls�r�DBrns����rro���r!)�dbrorurhs  ��rrZz'CoroutineTest.test_await_9.<locals>.foos��������%�B�
�
��%�K�����.�0�����C�����3F�F��%�K�$�&�'�/5�r�t�t�v�x��8�
9�K��.��3F�����sU�B�B	�B�B�B�B
�B�!B�" B�B�B�B�
B�B�Bc��0�K����d{���S7��wrrr�s�r�foo2z(CoroutineTest.test_await_9.<locals>.foo2#s������%�K�<��K�r�i��i���rB)rrZrtrurhs   @@r�test_await_9zCoroutineTest.test_await_9sO���	�	�	9�	 �	
����3�5�)�B��;�7�����4�6�*�R��I�6rc�f���d���fd���fd�}|jt|��gdf�y)Nc��K�y�wr>rrrr�bazz(CoroutineTest.test_await_10.<locals>.baz*rrrsc���K���S�wrr)rxs�rruz(CoroutineTest.test_await_10.<locals>.bar-s������5�L�s�c��B�K����d{����d{���S7�7��wrrr�s�rrZz(CoroutineTest.test_await_10.<locals>.foo0s����� #��+�&�&�+��&�s������r?rB)rrZrurxs  @@r�
test_await_10zCoroutineTest.test_await_10)s/���	�	�	'�	
����3�5�)�B��8�4rc�n���d��d����fd�}�fd�}|jt|��gdf�y)Nc��|Srr��vals r�identz*CoroutineTest.test_await_11.<locals>.ident6s���Jrc��K�y�wr�rrrrruz(CoroutineTest.test_await_11.<locals>.bar9r�rsc��<�K�����d{�����S7�	�w)Nr~r)rur�s��rrZz(CoroutineTest.test_await_11.<locals>.foo<s������3�5�[�)�)�[�s�
��
c��2�K����d{���dfS7��w)Nr�rr�s�rrtz)CoroutineTest.test_await_11.<locals>.foo2?s�������;��%�%�;�s���)r�r�rB)rrZrtrur�s   @@r�
test_await_11zCoroutineTest.test_await_115s5���	�	�	*�	&�	
����4�6�*�R��,A�Brc�����d�}|��G�fd�d���fd�}|jtd�5t|��ddd��j�y#1swY�xYw)Nc��K�y�wr�rrrrr+z)CoroutineTest.test_await_12.<locals>.coroEr�rsc���eZdZ�fd�Zy)�.CoroutineTest.test_await_12.<locals>.Awaitablec����Srr)rr�s �rrz8CoroutineTest.test_await_12.<locals>.Awaitable.__await__Js����rNrH�r�s�rrIr�Is���
rrIc��.�K����d{���S7��wrrrKs�rrZz(CoroutineTest.test_await_12.<locals>.fooM������"��$�$�$�rAz"__await__\(\) returned a coroutine)r�r�r/r�)rr+rZrIr�s   @@r�
test_await_12zCoroutineTest.test_await_12Ds]���	��F��	�	�	%��
#�
#��@�B��c�e��B�	
���	�	B�B�s�A�A'c���Gd�d���fd�}|jtd�5t|��ddd�y#1swYyxYw)Nc��eZdZd�Zy)�.CoroutineTest.test_await_13.<locals>.Awaitablec��|Srrrs rrz8CoroutineTest.test_await_13.<locals>.Awaitable.__await__X����rNrHrrrrIr�W���
rrIc��.�K����d{���S7��wrrrKs�rrZz(CoroutineTest.test_await_13.<locals>.foo[r�rArMr2rNs  @r�
test_await_13zCoroutineTest.test_await_13VsH���	�	�	%��
#�
#��A�C�
�c�e��C�C�C�rPc������Gd�d��Gd�d��Gd�dt����fd����fd�}|�}|jd�|jtd	�5|jd	�ddd�|�}|jd�|j	��5|jt�ddd�y#1swY�QxYw#1swYyxYw)
Nc��eZdZd�Zd�Zy)�,CoroutineTest.test_await_14.<locals>.Wrapperc��||_yrr�)rr+s  rrz5CoroutineTest.test_await_14.<locals>.Wrapper.__init__fs	�� ��	rc�6�|jj�Sr)r+rrs rrz6CoroutineTest.test_await_14.<locals>.Wrapper.__await__is���y�y�*�*�,�,rNrrrr�Wrapperr�ds��
!�
-rr�c��eZdZd�Zy)�/CoroutineTest.test_await_14.<locals>.FutureLikec3�K�d��S�wrrrs rrz9CoroutineTest.test_await_14.<locals>.FutureLike.__await__ms������s�NrHrrr�
FutureLiker�ls��
rr�c��eZdZy)�+CoroutineTest.test_await_14.<locals>.MarkerNrbrrr�Markerr�prcrr�c��N�K�	���d{���S7�#t$r��wxYw�wrr�)r�r�s��r�coro1z*CoroutineTest.test_await_14.<locals>.coro1ss-�����
�'�\�)�)�)��$�
���
�s �%�
���%��"�%c��:�K������d{���S7��wrr)r�r�s��r�coro2z*CoroutineTest.test_await_14.<locals>.coro2xs����� ���)�)�)�)�s���r�)r�r(r�r)rGr�r�)rr�r�r�r�r�r�s   @@@@r�
test_await_14zCoroutineTest.test_await_14cs����	-�	-�	�	�	�Y�	�	�
	*�
�G��	���t��
�
#�
#�M�6�
:�
�F�F�6�N�;�
�G��	���t��
�
�
�v�
&�
�G�G�%�&�'�
&�;�
:��
'�
&�s�"C�%C�C
�Cc���tjd����fd�}d�}|�}|jd�|jtd�5||�jd�ddd�y#1swYyxYw)Nc3�K�d��y�wrrrrrr�z(CoroutineTest.test_await_15.<locals>.nop�r�rjc��0�K����d{���y7��wrrr�s�rr�z.CoroutineTest.test_await_15.<locals>.coroutine�r�r�c��$K�|�d{���y7��wrrr�s r�waiterz+CoroutineTest.test_await_15.<locals>.waiter�s
�����J�J�r1z"coroutine is being awaited already)rwr�r(r�r�)rr�r�r+r�s    @r�
test_await_15zCoroutineTest.test_await_15�sp���	���	�
�	�	�	��{���	�	�$��
�
#�
#�L�$H�J��4�L���d�#�J�J�J�s�A/�/A8c�r��d���fd�}t|��\}}|j|j�y)Nc��K�t�S�wr)r�rrrr�z&CoroutineTest.test_await_16.<locals>.f�s�����<��s�
c��H�K�	t�#���d{���7cYSxYw�wr)�KeyError)r�s�rr�z&CoroutineTest.test_await_16.<locals>.g�s#�����
!����
!��S�y�y� �s�"�����")r/r�__context__)rr�r�r-r�s    @r�
test_await_16zCoroutineTest.test_await_16�s2���	 �	!��a�c�N�	��6����&�,�,�-rc����Gd�d���fd�}|�}t|�\}}|j|gd���fd�}|jt�5t|��ddd�y#1swYyxYw)Nc��eZdZd�Zd�Zd�Zy)�*CoroutineTest.test_with_1.<locals>.Managerc��||_yr)�name)rr�s  rrz3CoroutineTest.test_with_1.<locals>.Manager.__init__�s	�� ��	rc��pK�td|jzd|jzg��d{���|S7��w)Nzenter-1-zenter-2-�r	r�rs r�
__aenter__z5CoroutineTest.test_with_1.<locals>.Manager.__aenter__�s>����$�j�4�9�9�&<�&0�4�9�9�&<�&>�?�?�?���?�s�+6�4�6c��K�td|jzd|jzg��d{���|jdk(ryy7��w)Nzexit-1-zexit-2-�BTr�)rr*s  r�	__aexit__z4CoroutineTest.test_with_1.<locals>.Manager.__aexit__�sO����$�i�$�)�)�&;�&/�$�)�)�&;�&=�>�>�>��9�9��#��$�>�s�+A�A�AN)rrrrr�r�rrr�Managerr��s��
!�
�

 rr�c��Z�K��d�4�d{���}�d�4�d{���}td|j|jfg��d{���ddzddd��d{���ddd��d{���y7�f7�W7�.7�#1�d{���7swY�+xYw7�"#1�d{���7swYyxYw�w)N�Ar��managersr2rr�)r�r!r�s  �rrZz&CoroutineTest.test_with_1.<locals>.foo��n������s�|�|�q�'�#�,�,�!�$�z�1�6�6�1�6�6�&B�%C�D�D�D��!��+7�,�|�|�|��,��D��+7��,�,�,��|��|�|�|���
B+�A7�B+�
B�A9�B�'A?�A;�
	A?�B�!A=�"B�&B+�1B�2B+�9B�;A?�=B�?B	�B�B	�
B�B+�B(�B�B(�$B+)	z	enter-1-Az	enter-2-Az	enter-1-Bz	enter-2-B)r�r�r�zexit-1-Bzexit-2-Bzexit-1-Azexit-2-Ac��Z�K��d�4�d{���}�d�4�d{���}td|j|jfg��d{���ddzddd��d{���ddd��d{���y7�f7�W7�.7�#1�d{���7swY�+xYw7�"#1�d{���7swYyxYw�w)Nr��Cr�r2rr�)r�r�r�s  �rrZz&CoroutineTest.test_with_1.<locals>.foo�r�r�)r/r^rGr�)rrZr�r-r�r�s     @r�test_with_1zCoroutineTest.test_with_1�sk���	 �	 �"	�

�E���a�L�	�������E�	
�	�
�
�
�0�
1��c�e��2�
1�
1�s�A.�.A7c�����Gd�d��d���fd�}|jtd�5t|��ddd�|j�d�y#1swY�xYw)Nc��eZdZd�Zy)�%CoroutineTest.test_with_2.<locals>.CMc��yrrrs rr�z0CoroutineTest.test_with_2.<locals>.CM.__aenter__����rN)rrrr�rrr�CMr�����
rr�c���K�d���4�d{���d�ddd��d{���y7�7�#1�d{���7swYyxYw�w�NFTr�r��
body_executeds��rrZz&CoroutineTest.test_with_2.<locals>.foo��+�����!�M��t�t� $�
��t�t��t��t�t�t��6�A�)�A�-�A�+�A�A�?�6�?�Az'asynchronous context manager.*__aexit__F�r�r�r/r��rrZr�r�s  @@r�test_with_2zCoroutineTest.test_with_2�sT���	�	��
�	%��
#�
#�I�/X�
Y��c�e��Z��
�
�m�U�+�Z�
Y���A�A c�����Gd�d��d���fd�}|jtd�5t|��ddd�|j�d�y#1swY�xYw)Nc��eZdZd�Zy)�%CoroutineTest.test_with_3.<locals>.CMc��yrrrs rr�z/CoroutineTest.test_with_3.<locals>.CM.__aexit__�r�rN)rrrr�rrrr�r��r�rr�c���K�d���4�d{���d�ddd��d{���y7�7�#1�d{���7swYyxYw�wr�rr�s��rrZz&CoroutineTest.test_with_3.<locals>.foo�r�r��asynchronous context managerFr�r�s  @@r�test_with_3zCoroutineTest.test_with_3�sT���	�	��
�	%��
#�
#�I�/M�
N��c�e��O��
�
�m�U�+�O�
N�r�c�����Gd�d��d���fd�}|jtd�5t|��ddd�|j�d�y#1swY�xYw)Nc��eZdZy)�%CoroutineTest.test_with_4.<locals>.CMNrbrrrr�r��rcrr�c���K�d���4�d{���d�ddd��d{���y7�7�#1�d{���7swYyxYw�wr�rr�s��rrZz&CoroutineTest.test_with_4.<locals>.foo�r�r�r�Fr�r�s  @@r�test_with_4zCoroutineTest.test_with_4�sT���	�	��
�	%��
#�
#�I�/M�
N��c�e��O��
�
�m�U�+�O�
N�r�c����Gd�d����fd�}�jt�5t|��ddd�y#1swYyxYw)Nc��eZdZd�Zd�Zy)�%CoroutineTest.test_with_5.<locals>.CMc��K�|S�wrrrs rr�z0CoroutineTest.test_with_5.<locals>.CM.__aenter__���������c��K�y�wrr)r�excs  rr�z/CoroutineTest.test_with_5.<locals>.CM.__aexit__�	�����rsN�rrrr�r�rrrr�r�s��
�
rr�c���K���4�d{����jdd�ddd��d{���y7�'7�#1�d{���7swYyxYw�w)Nr�r2)r^)r�rs��rr�z'CoroutineTest.test_with_5.<locals>.func	s1������t�t�� � ���*��t�t��t��t�t�t�s<�A�7�A�;�A�9�A�A�A
�A�A
�	A)rG�AssertionErrorr/)rr�r�s` @r�test_with_5zCoroutineTest.test_with_5�s8���
	�	�	+��
�
�~�
.��d�f��/�
.�
.�s�A�Ac���Gd�d���fd�}|jtd�5t|��ddd�y#1swYyxYw)Nc��eZdZd�Zd�Zy)�%CoroutineTest.test_with_6.<locals>.CMc��y)N�{rrs rr�z0CoroutineTest.test_with_6.<locals>.CM.__aenter__���rc��y�Ni�r�r�es  rr�z/CoroutineTest.test_with_6.<locals>.CM.__aexit__r�rNr�rrrr�r�s��
�
rr�c���K���4�d{���	ddd��d{���y7�7�#1�d{���7swYyxYw�wrr�r�s�rrZz&CoroutineTest.test_with_6.<locals>.foos$������t�t���t�t��t��t�t�t�s0�?�&�?�*�?�(�?�?�<�3�<�?zV'async with' received an object from __aenter__ that does not implement __await__: intr2)rrZr�s  @r�test_with_6zCoroutineTest.test_with_6sF���	�	�	��
#�
#��9�:�

�c�e��:�:�:�rPc�^��Gd�d���fd�}	t|��|jd�y#t$ro}|j|jdd�|j|jdu�|jt|jt��Yd}~yd}~wwxYw)Nc��eZdZd�Zd�Zy)�%CoroutineTest.test_with_7.<locals>.CMc��K�|S�wrrrs rr�z0CoroutineTest.test_with_7.<locals>.CM.__aenter__%r�r�c��y)Ni�rr�s  rr�z/CoroutineTest.test_with_7.<locals>.CM.__aexit__(r�rNr�rrrr�r$���
�
rr�c���K���4�d{���ddzddd��d{���y7�7�#1�d{���7swYyxYw�w�Nr2rrr�s�rrZz&CoroutineTest.test_with_7.<locals>.foo,s(������t�t��!���t�t��t��t�t�t��8�A�*�A�.�A�,�A�A�A�7�A�Az1invalid asynchronous context manager did not failr�U'async with' received an object from __aexit__ that does not implement __await__: int)	r/�failr�r�r*r_r��
isinstancer�)rrZr�r�s   @r�test_with_7zCoroutineTest.test_with_7#s����	�	�	�
	K��c�e��
�I�I�I�J���	L���������9�
:�
�O�O�C�O�O�4�7�8��O�O�J�s���8I�J�K�K��
	L�s�4�	B,�A%B'�'B,c����d�Gd�d����fd�}|jtd�5t|��ddd�|j�d���fd�}|jtd�5t|��ddd�|j�d���fd	�}|jtd�5t|��ddd�|j�d
���fd�}|jtd�5t|��ddd�|j�d�y#1swY��xYw#1swY��xYw#1swY�{xYw#1swY�@xYw)
Nrc��eZdZd�Zd�Zy)�%CoroutineTest.test_with_8.<locals>.CMc��K�|S�wrrrs rr�z0CoroutineTest.test_with_8.<locals>.CM.__aenter__Ar�r�c��yr�rr�s  rr�z/CoroutineTest.test_with_8.<locals>.CM.__aexit__Dr�rNr�rrrr�r@rrr�c���K���4�d{����dz
�ddd��d{���y7�7�#1�d{���7swYyxYw�wr�r�r��CNTs��rrZz&CoroutineTest.test_with_8.<locals>.fooH�*������t�t��q����t�t��t��t�t�t�rrr2c���K�td�D])}��4�d{����dz
�	ddd��d{���yy7�7�
#1�d{���7swY�CxYw�w�Nr1r2�r[�r5r�rs ��rrZz&CoroutineTest.test_with_8.<locals>.fooTs>������1�X���4�4��1�H�C�� �4�4����4��4�4�4�s>�A�<�A�A�A�>�	A�A�A	�A	�A	�Ar1c���K�td�D](}��4�d{����dz
�	ddd��d{����*y7�7�	#1�d{���7swY�BxYw�wrrrs ��rrZz&CoroutineTest.test_with_8.<locals>.foobs>������1�X���4�4��1�H�C�� �4�4����4��4�4�4�s<�A�;�A�?�A�=�A�A�A	�A�A	�
Ar
c���K���4�d{����dz
�	ddd��d{���y7�7�#1�d{���7swYyxYw�wr�rrs��rrZz&CoroutineTest.test_with_8.<locals>.foops-������t�t��q�����t�t��t��t�t�t�s8�A�+�A�/�A�-�A�A�A�8�A�A�)r�r�r/r^�rrZr�rs  @@r�test_with_8zCoroutineTest.test_with_8=s?�����	�	�	��
#�
#��9�:�
�c�e��	:�
	
����a� �	��
#�
#��9�:�
�c�e��	:�
	
����a� �	��
#�
#��9�:�
�c�e��	:�
	
����a� �	�
�
#�
#��9�:�
�c�e��	:�
	
����a� �]:�:��:�:��:�:��:�:�s/�D,�2D8�9E�E�,D5�8E�E
�Ec�����d�Gd�d����fd�}|jt�5t|��ddd�|j�d�y#1swY�xYw)Nrc��eZdZd�Zd�Zy)�%CoroutineTest.test_with_9.<locals>.CMc��K�|S�wrrrs rr�z0CoroutineTest.test_with_9.<locals>.CM.__aenter__�r�r�c��K�ddzy�wrrr�s  rr�z/CoroutineTest.test_with_9.<locals>.CM.__aexit__��
�����!��r�Nr�rrrr�r ����
�
rr�c���K���4�d{����dz
�ddd��d{���y7�7�#1�d{���7swYyxYw�wr�rrs��rrZz&CoroutineTest.test_with_9.<locals>.foo�rrr2�rGr�r/r^rs  @@r�test_with_9zCoroutineTest.test_with_9}sR�����	�	�	�
�
�
�0�
1��c�e��2�	
����a� �2�
1���A�Ac����d�Gd�d����fd�}	t|��|jd�y#t$r�}|j|jdu�|jt|jt��|jt|jjt��Yd}~yd}~wwxYw)Nrc��eZdZd�Zd�Zy)�&CoroutineTest.test_with_10.<locals>.CMc��K�|S�wrrrs rr�z1CoroutineTest.test_with_10.<locals>.CM.__aenter__�r�r�c��K�ddzy�wrrr�s  rr�z0CoroutineTest.test_with_10.<locals>.CM.__aexit__�r#r�Nr�rrrr�r+�r$rr�c����K���4�d{�����4�d{���t�7�7�#1�d{���7swYnxYwddd��d{���7y#1�d{���7swYyxYw�wr�r�rs��rrZz'CoroutineTest.test_with_10.<locals>.foo�s9������t�t��4�4�&�&�����4�4�4���t�t�t�t�sg�A*�*�A*�A�,�A�.�A*�A�A	�7�A	�A�A*�A�A*�A'�A�A'�#A*z*exception from __aexit__ did not propagate)r/r	r�r_r�r
r��rrZr�r�rs   @@r�test_with_10zCoroutineTest.test_with_10�s������	�	�	'�	D��c�e��
�I�I�B�C��
!�	6��O�O�C�O�O�4�7�8��O�O�J�s���8I�J�K��O�O�J�s���'B�'B�'3�5�
6�
6��	6�s�8�	C�A9B?�?Cc�����d�Gd�d����fd�}	t|��|jd�y#t$r'}|j|jdu�Yd}~yd}~wwxYw)Nrc��eZdZd�Zd�Zy)�&CoroutineTest.test_with_11.<locals>.CMc��K�t��wr)�NotImplementedErrorrs rr�z1CoroutineTest.test_with_11.<locals>.CM.__aenter__�s����)�)�r�c��K�ddzy�wrrr�s  rr�z0CoroutineTest.test_with_11.<locals>.CM.__aexit__�r#r�Nr�rrrr�r4�s��
*�
rr�c��f�K���4�d{���t�7�
#1�d{���7swYyxYw�wrr/rs��rrZz'CoroutineTest.test_with_11.<locals>.foo�s ������t�t�"�"���t�t�t�s$�1��1��1�.�%�.�1z+exception from __aenter__ did not propagate)r/r	r6r_r�r0s   @@r�test_with_11zCoroutineTest.test_with_11�s`�����	�	�	#�
	E��c�e��
�I�I�C�D��#�	5��O�O�C�O�O�t�3�4�4��	5�s�8�	A(�A#�#A(c�P����d�Gd�d�����fd�}t|��y)Nrc��eZdZd�Zd�Zy)�&CoroutineTest.test_with_12.<locals>.CMc��K�|S�wrrrs rr�z1CoroutineTest.test_with_12.<locals>.CM.__aenter__�r�r�c��K�y�w�NTrr�s  rr�z0CoroutineTest.test_with_12.<locals>.CM.__aexit__��	�����rsNr�rrrr�r<�s��
�
rr�c���K���4�d{���}�j|j��t�7�&#1�d{���7swYyxYw�wr)r��	__class__r�)�cmr�rrs ���rrZz'CoroutineTest.test_with_12.<locals>.foo�s4������t�t�r��
�
�b�l�l�B�/�"�"���t�t�t�s,�A
�6�A
�#8�A
�A
�A�A
�A
)r/rs` @@r�test_with_12zCoroutineTest.test_with_12�s#�����	�	�	#�	�#�%�rc�����d�Gd�d����fd�}|jt�5t|��ddd�|j�d�y#1swY�xYw)Nrc��eZdZd�Zd�Zy)�&CoroutineTest.test_with_13.<locals>.CMc��K�ddzy�wrrrs rr�z1CoroutineTest.test_with_13.<locals>.CM.__aenter__�r#r�c��K�y�wr?rr�s  rr�z0CoroutineTest.test_with_13.<locals>.CM.__aexit__�r@rsNr�rrrr�rG�s��
�
rr�c���K��dz
���4�d{����dz
�ddd��d{����dz
�y7�7�#1�d{���7swY�xYw�w)Nr2rp�'rrs��rrZz'CoroutineTest.test_with_13.<locals>.foo�s?������1�H�C��t�t��t����t��5�L�C���t��t�t�t�s:�A
�4�A
�8�A
�6�A
�A
�A
�A�A
�A
r2r&rs  @@r�test_with_13zCoroutineTest.test_with_13�sP�����	�	�	��
�
�0�
1��c�e��2�����a� �2�
1�r(c�V���	�d�G�fd�d��g�	��	fd�}t|��\}}|j�d�|j|tdd�D�cgc]}|dz��	c}�|j�	tdd�D�cgc]}|d	z��	c}�g�	��	fd
�}t|��\}}|j�d	�|j|ddg�|j�	tdd�D�cgc]}|��c}d
gz�g�	��	fd�}t|��\}}|j�d�|j|tdd�D�cgc]}|dz��	c}�|j�	tdd�D�cgc]}|��c}dd
gz�ycc}wcc}wcc}wcc}wcc}w)Nrc�$��eZdZd�Z�fd�Zd�Zy)�+CoroutineTest.test_for_1.<locals>.AsyncIterc��d|_yr&rWrs rrz4CoroutineTest.test_for_1.<locals>.AsyncIter.__init__��	����rc����dz
�|Sr�r)r�aiter_callss �r�	__aiter__z5CoroutineTest.test_for_1.<locals>.AsyncIter.__aiter__�s����q� ���rc���K�|xjdz
c_|jdzs t|jdz��d{���|jdkDrt�|j|jfS7�1�w)Nr2rqr�)r5r�StopAsyncIterationrs r�	__anext__z5CoroutineTest.test_for_1.<locals>.AsyncIter.__anext__�s\�������!��������$�T�V�V�b�[�1�1�1��6�6�C�<�,�,��v�v�t�v�v�~�%�2�s�AA6�A4�2A6N�rrrrrTrW)rSs�r�	AsyncIterrO�s���
�
�
	
&rrYc��d�K���23d{���\}}�j||z��!7�6y�wr�r')�i1�i2rYr,s  ��r�test1z'CoroutineTest.test_for_1.<locals>.test1s/����� )��
'�f�b�"��
�
�b�2�g�&�
'���s�0�.�,�.�0�.�0r2�r��er1c���K���23d{���}�j|d�|ddk(s�&�jd�y7�46�jd��'�w�Nr��what?�endr[�r5rYr,s ��r�test2z'CoroutineTest.test_for_1.<locals>.test2
sU�����$�;�
'�a��
�
�a��d�#��Q�4�2�:��
�M�M�%� �

'��;�
�
�
�g�&�s*�A�A�A�A�A�A�A�A���rec���K���23d{���}|ddkDr��j|d��'7�"6�jd��jd�y�wrbr[rfs ��r�test3z'CoroutineTest.test_for_1.<locals>.test3sS�����$�;�
'�a��Q�4�"�9���
�
�a��d�#�
'��;�
�
�
�g�&��M�M�%� �s�A�4�2�4�A�4�$Ar
rd)r/r^r[)
rr^�yieldedr�r5rgrkrYrSr,s
       @@@r�
test_for_1zCoroutineTest.test_for_1�s������	&�	&�*��	'��u�w�'�
�������a�(�����E�!�R�L�"A�L�q�1�s�7�L�"A�B�����u�Q��}�!=�}�!�!�A�#�}�!=�>���	!��u�w�'�
�������a�(�����3��*�-�����U�1�b�\�!:�\��!�\�!:�e�W�!D�E���	!��u�w�'�
�������a�(�����E�!�R�L�"A�L�q�1�s�7�L�"A�B�����U�1�b�\�!:�\��!�\�!:�")�5�!1�"2�	3��K#B��!=��$";��"#B��!:s�F
�F
�4	F
�F!
�<	F&
c���d�tj��}�fd�}|jtd�5t	|��ddd�|jtj��|�y#1swY�/xYw)Nr:c��B�K��23d{���}td��7�6y�w�Nznever going to happen��print)r5�tups �rrZz%CoroutineTest.test_for_2.<locals>.foo4s"������
/�a��-�.�
/��3�������
��z/async for' requires an object.*__aiter__.*tuple��sys�getrefcountr�r�r/r^)r�refs_beforerZrss   @r�
test_for_2zCoroutineTest.test_for_20sl������o�o�c�*��	/��
#�
#��L�N�
�c�e��N�
	
�������-�{�;�N�N�s�A3�3A<c���Gd�d�}|��tj��}�fd�}|jtd�5t	|��ddd�|jtj��|�y#1swY�/xYw)Nc��eZdZd�Zy)�#CoroutineTest.test_for_3.<locals>.Ic��|Srrrs rrTz-CoroutineTest.test_for_3.<locals>.I.__aiter__Ar�rN�rrrrTrrr�Ir|@r�rrc��B�K��23d{���}td��7�6y�wrprq�r5�aiters �rrZz%CoroutineTest.test_for_3.<locals>.fooG�"����� �
/�a��-�.�
/��5�rtz!that does not implement __anext__ru�rrrxrZr�s    @r�
test_for_3zCoroutineTest.test_for_3?sv���	�	�����o�o�e�,��	/��
#�
#��4�6�
�c�e��	6�	
�������/��=�
6�6���B�Bc���Gd�d�}|��tj��}�fd�}|jtd�5t	|��ddd�|jtj��|�y#1swY�/xYw)Nc��eZdZd�Zd�Zy)�#CoroutineTest.test_for_4.<locals>.Ic��|Srrrs rrTz-CoroutineTest.test_for_4.<locals>.I.__aiter__Ur�rc��y)Nrrrs rrWz-CoroutineTest.test_for_4.<locals>.I.__anext__Xs��rN)rrrrTrWrrrrr�Ts��
�
rrc��B�K��23d{���}td��7�6y�wrprqr�s �rrZz%CoroutineTest.test_for_4.<locals>.foo^r�rtz7async for' received an invalid object.*__anext__.*tuplerur�s    @r�
test_for_4zCoroutineTest.test_for_4Ssz���	�	�����o�o�e�,��	/��
#�
#��I�K�
�c�e��	K�	
�������/��=�
K�K�r�c�������d�G�fd�d��Gd�d��������tj��}tj��}���fd�}tj�5tjd�t|��ddd�|j
�d�|j
tj��|�|j
tj��|����fd	�}t|��|j
�d
����fd�}t|��|j
�d�y#1swY��xYw)
Nrc�"��eZdZ�fd�Z�fd�Zy)�)CoroutineTest.test_for_6.<locals>.Managerc���K��dz
�y�w)NrKr)rrs �rr�z4CoroutineTest.test_for_6.<locals>.Manager.__aenter__ns������U�
����
c���K��dz
�y�w)Ni��r)rr*rs  �rr�z3CoroutineTest.test_for_6.<locals>.Manager.__aexit__rs������V���r�Nr�)rs�rr�r�ms
���
�
rr�c��eZdZd�Zd�Zd�Zy)�*CoroutineTest.test_for_6.<locals>.Iterablec��d|_yr&rWrs rrz3CoroutineTest.test_for_6.<locals>.Iterable.__init__wrQrc��|Srrrs rrTz4CoroutineTest.test_for_6.<locals>.Iterable.__aiter__zr�rc��vK�|jdkDrt�|xjdz
c_|jS�w�Nrqr2)r5rVrs rrWz4CoroutineTest.test_for_6.<locals>.Iterable.__anext__}s-�����6�6�B�;�,�,����!����v�v�
�s�79NrXrrr�Iterabler�vs��
�
�
rr�c���K��4�d{����23d{���}�dz
��7�7�6ddd��d{���7n#1�d{���7swYnxYw�dz
�y�w�Nr2rpr)r5rr!�managers ���r�mainz&CoroutineTest.test_for_6.<locals>.main�sH������w�'��!���F�A�����x��w�w�w�w��
��I�A�sR�A� �A�7�$�"�$�7�A�$�7�A�3�A�A	�A�A	�
A�errori��c��f�K���4�d{�����23d{���}�dz
��7�7�6ddd��d{���7n#1�d{���7swYnxYw�dz
���4�d{���7��23d{���7}�dz
��6ddd��d{���7n#1�d{���7swYnxYw�dz
�y�wr�r�r5rr�r�s ���rr�z&CoroutineTest.test_for_6.<locals>.main�s�������y�y�'�z��!���F�A�!����z�!�y�y�y�y��
��I�A��y�y�'�z���!���F�A� *�!�y�y�y�y��
��I�A�s��B1�*�B1�A�.�,�.�A�B1�.�A�B1�=�B1�A�A
�A�B1�&A)�'B1�+B�3B�7A:�8B�<B�B1�B�B1�B(�B�B(�$
B1i�c���K���4�d{����dz
���23d{���}�dz
��7�7�6�dz
�ddd��d{���7n#1�d{���7swYnxYw�dz
���4�d{���7�dz
���23d{���7}�dz
��6�dz
�ddd��d{���7n#1�d{���7swYnxYw�dz
�y�w)Nr�r2i���rprr�s ���rr�z&CoroutineTest.test_for_6.<locals>.main�s�������y�y��S���'�z�"�!���F�A�!��"��z���M�A�!�y�y�y�y��
��I�A��y�y��S���'�z�"�"�!���F�A� *���M�A�!�y�y�y�y��
��I�A�s��C�/�C�
A�3�1�3�A�C�3�A�C�A�C�A�A�A�C�0A3�1C�5
B*�B�B	�B�
B*�C�#B&�$C�*B<�0B3�1B<�8
Ci��9)rvrwr9r:r;r/r^)	r�mrefs_before�irefs_beforer�rr�r�r!r�s	    @@@@@r�
test_for_6zCoroutineTest.test_for_6js
���
��	�	�	�	��)���:�����w�/�����x�0��	��
$�
$�
&��!�!�'�*�
�d�f��	'�
	
����F�#��������1�<�@��������2�L�A�	�	�$�&������F�#�	�&	�$�&������H�%�e'�
&�s�1&E�Ec�����d�Gd�d����fd�}|jt�5t|��ddd�|j�d�y#1swY�xYw)Nrc��eZdZd�Zy)�$CoroutineTest.test_for_7.<locals>.AIc��ddzyrrrs rrTz.CoroutineTest.test_for_7.<locals>.AI.__aiter__��	���!�rNr~rrr�AIr�����
rr�c��J�K���23d{���}�dz
��7�
6�dz
�y�w�Nr2rqr�r5r�rs ��rrZz%CoroutineTest.test_for_7.<locals>.foo��-������4�
�a��q���
��4��2�I�C���#����#��#r&�rrZr�rs  @@r�
test_for_7zCoroutineTest.test_for_7�sP�����	�	�	�
�
�
�0�
1��c�e��2�����a� �2�
1�r(c�@���d�Gd�d����fd�}|jt�5tj�5tjd�t|��ddd�ddd�|j
�d�y#1swY�$xYw#1swY�(xYw)Nrc��eZdZd�Zy)�$CoroutineTest.test_for_8.<locals>.AIc��ddzyrrrs rrTz.CoroutineTest.test_for_8.<locals>.AI.__aiter__�r�rNr~rrrr�r��r�rr�c��J�K���23d{���}�dz
��7�
6�dz
�y�wr�rr�s ��rrZz%CoroutineTest.test_for_8.<locals>.foo�r�r�r�)rGr�r9r:r;r/r^r�s  @@r�
test_for_8zCoroutineTest.test_for_8�s|�����	�	�	�
�
�
�0�
1��(�(�*��%�%�g�.��#�%� �	+�2�	
����a� �+�*��2�
1�s"�B�&B�%B�B	�
B�Bc���Gd�d���fd�}|jtd�5}|�jd�ddd�j}|j	|j
t�y#1swY�6xYw)Nc��eZdZd�Zd�Zd�Zy)�$CoroutineTest.test_for_11.<locals>.Fc��|Srrrs rrTz.CoroutineTest.test_for_11.<locals>.F.__aiter__�r�rc��|Srrrs rrWz.CoroutineTest.test_for_11.<locals>.F.__anext__�r�rc��ddzyrrrs rrz.CoroutineTest.test_for_11.<locals>.F.__await__�s	���A�rN)rrrrTrWrrrr�Fr��s��
�
�
rr�c��6�K���23d{���}�
7�6y�wrr)r�r�s �rr�z'CoroutineTest.test_for_11.<locals>.main�s������3�
�a��
��3�s�������z an invalid object from __anext__)r�r�r(�	exceptionrv�	__cause__r�)rr�r��errr�s    @r�test_for_11zCoroutineTest.test_for_11�sl���	�	�	��
#�
#�I�$F�H�KL��F�K�K���H��k�k�����c�m�m�->�?�H�H�s�A3�3A<c�����Gd�dt��Gd�dt��g����fd�}|j��5|�jd�ddd�|j	�dg�y#1swY�xYw)Nc��eZdZy)�*CoroutineTest.test_for_tuple.<locals>.DoneNrbrrr�Doner����rr�c��eZdZdZd�Zd�Zy)�+CoroutineTest.test_for_tuple.<locals>.AIterrc��|Srrrs rrTz5CoroutineTest.test_for_tuple.<locals>.AIter.__aiter__�r�rc��K�|jt|�k\rt�|xjdz
c_||jdz
S�wr�)r5�lenrVrs rrWz5CoroutineTest.test_for_tuple.<locals>.AIter.__anext__s<�����6�6�S��Y�&�,�,����!����D�F�F�Q�J�'�'�s�AAN�rrrr5rTrWrrr�AIterr��s���A�
�
(rr�c��^�K��dg�23d{���}�j|��7�6���wr>r[�r5r�r�r-s ���rrZz)CoroutineTest.test_for_tuple.<locals>.foos0����� �"��;�
!�a��
�
�a� �
!��;��J�s�
-�*�(�*�-�*�-r?)r�r�rGr(r^�rrZr�r�r-s  @@@r�test_for_tuplezCoroutineTest.test_for_tuple�sa���#�9�#�	(�E�	(���	�
�
�
�t�
$��E�J�J�t��%�����"��&�%�
$���A/�/A8c�����Gd�dt��Gd�dt��g����fd�}|j��5|�jd�ddd�|j	�dg�y#1swY�xYw)Nc��eZdZy)�3CoroutineTest.test_for_stop_iteration.<locals>.DoneNrbrrrr�r�r�rr�c��eZdZdZd�Zd�Zy)�4CoroutineTest.test_for_stop_iteration.<locals>.AIterrc��|Srrrs rrTz>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__aiter__r�rc��pK�|jrt�|xjdz
c_|jS�wr�)r5rVrrs rrWz>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__anext__s*�����6�6�,�,����!����z�z�!�s�46Nr�rrrr�r�s���A�
�
"rr�c��\�K��d�23d{���}�j|��7�6���wr>r[r�s ���rrZz2CoroutineTest.test_for_stop_iteration.<locals>.foos.����� ��9�
!�a��
�
�a� �
!��9��J�s�	,�)�'�)�,�)�,r?)r�r)rGr(r^r�s  @@@r�test_for_stop_iterationz%CoroutineTest.test_for_stop_iterationsa���#�9�#�	"�M�	"���	�
�
�
�t�
$��E�J�J�t��%�����"��&�%�
$�r�c�X��d���fd�}�fd�}�fd�}�fd�}|jt|��gddgf�|jt|��gddhf�|jt|��gddd	�f�|jt|��gddd
�f�y)Nc��K�|S�wrrrWs rr�z$CoroutineTest.test_comp_1.<locals>.f)������H�r�c��f�K��d��d�fD�cgc]}|�d{�����c}S7�	cc}w�w�Nr2�)r�r�r�s �r�run_listz+CoroutineTest.test_comp_1.<locals>.run_list,�1�����&'��d�A�b�E�]�3�]��!�G�G�]�3�3�G��3���1�
,�*
�,�1�,�1c��f�K��d��d�fD�chc]}|�d{�����c}S7�	cc}w�wr�rr�s �r�run_setz*CoroutineTest.test_comp_1.<locals>.run_set/r�r�c��h�K��d��d�fD�cic]
}|�d{���d��c}S7�
cc}w�w)Nr2r�r�rr�s �r�	run_dict1z,CoroutineTest.test_comp_1.<locals>.run_dict12s3�����+,�Q�4��2��-�8�-�Q�!�G�S�L�-�8�8�G��8�s�2�
-�+
�-�2�-�2c���K�t�d��d�g�D��cic]\}}||�d{�����c}}S7�
cc}}w�wr�)�	enumerate)r5r�r�s  �r�	run_dict2z,CoroutineTest.test_comp_1.<locals>.run_dict25s>�����+4�a��d�A�b�E�]�+C�D�+C�4�1�a�A�Q�w�J�+C�D�D�w��D�s�A�;�9�;�A�;�Ar2r�r�)r2r�)rr2rB)rr�r�r�r�r�s     @r�test_comp_1zCoroutineTest.test_comp_1(s����	�	4�	4�	9�	E�	
����8�:�.��a��W�
�>�����7�9�-��Q��G�}�=�����9�;�/�"�#�3�6G�1H�I�����9�;�/�"�!��m�1D�Erc���d���fd�}|jt|��ggd�f��fd�}|jt|��ghd�f��fd�}|jt|��gddhf�y)	Nc��K�|S�wrrrWs rr�z$CoroutineTest.test_comp_2.<locals>.f>r�r�c���K��d��d��d��ddg�fD��cgc]}|�d{���D]}|���c}}S7�cc}}w�w)N��abc�de�fgr�r��sr�s  �rr�z+CoroutineTest.test_comp_2.<locals>.run_listAs]����� !�"��q��x��2���4��,��H�&�H�!�#$�W�W���$��H�&�
&�$��&�s%�$A�
A�A�
A�A�A�A)r�r!r�r�r�c	���K���ddg��dg�g�fD���chc]"}|�d{���D]}|�d{���D]}|����$c}}}S7�!7�cc}}}w�w)Nrq�rcr)r�r��dr�s   �rr�z*CoroutineTest.test_comp_2.<locals>.run_setIs��������B��8��!"�B�4��!*�+�,�&�,��#$�W�W��#$�W�W��	�%�	�%��,�&�
&�%��$��	&�s6�A�
A�A�A�A�A�	A�A�A�A>rqrcr�c���K���d��d�g�fD��chc]}|�d{���D]}|�d{������c}}S7�7�cc}}w�w)Nrqrcrr�s  �r�run_set2z+CoroutineTest.test_comp_2.<locals>.run_set2Ts^�������2���"���/�0�&�0��#$�W�W���G�G�$��0�&�
&�$����&�s5�A�
A�A�A�A�A�A�A�A�ArqrcrB)rr�r�r�r�s    @r�test_comp_2zCoroutineTest.test_comp_2=s����	�	&�	
����h�j�!�
�,�-�	/�	&�	
����g�i� �
���	 �	&�
	
����h�j�!�
�"�b��N�	rc�V��d���fd�}|jt|��gddgf��fd�}|jt|��gddhf��fd�}|jt|��gddd	�f��fd
�}|jt|��gddgf�y)
Nc�$K�|D]}|����	y�wrr�rr5s  rr�z$CoroutineTest.test_comp_3.<locals>.f^����������r$c��\�K��ddg�2�cgc3d{���}|dz��7�
6c}Scc}w�w�Nrqrcr2r�r5r�s �rr�z+CoroutineTest.test_comp_3.<locals>.run_listb�.�����)*�B��8��5�5�A�A��E�5��5�5��5��$�
,�'�#�!
�#�'�#�'�,r_ric��\�K��ddg�2�chc3d{���}|dz��7�
6c}Scc}w�wrrrs �rr�z*CoroutineTest.test_comp_3.<locals>.run_sethrr	c��d�K��ddg�2�cic3d{���}|dz|dz��7�6c}Scc}w�w�Nrqrcr2r1rrs �r�run_dictz+CoroutineTest.test_comp_3.<locals>.run_dictns6�����01�2�r�(��<�<�1�A��E�1�q�5�L�<��<�<��<�s$�
0�+�'�%
�'�+�'�+�0��)r_ric��n�K�d��ddg�2�}|2�cgc3d{���}|dz��7�
6c}Scc}w�w)Nc�8K�|3d{���}|dz����7�
6y�wr�r��.0r5s  r�	<genexpr>z=CoroutineTest.test_comp_3.<locals>.run_gen.<locals>.<genexpr>us����4�4�1�1�q�5�4��4�������
��rqrcr�r�rir�r�s  �r�run_genz*CoroutineTest.test_comp_3.<locals>.run_gents8�����4��2�r�(��4�C�+.�/�/�a�A��G�/��/�/��/��$�5�0�,�*
�,�0�,�0�5�o�yrB�rr�r�r
rr�s     @r�test_comp_3zCoroutineTest.test_comp_3]s����	�	6�����h�j�!�
�"�b��N�	�	6�����g�i� �
�"�b��N�	�	=�����h�j�!�
�b�b�!�"�	$�	0�	
����g�i� �
�#�s���	rc�N��d���fd�}|jt|��gdgf��fd�}|jt|��gdhf��fd�}|jt|��gddif��fd�}|jt|��gdgf�y)	Nc�$K�|D]}|����	y�wrrrs  rr�z$CoroutineTest.test_comp_4.<locals>.f|rr$c��h�K��ddg�2�cgc3d{���}|dkDs�|dz��7�6c}Scc}w�wrrrs �rr�z+CoroutineTest.test_comp_4.<locals>.run_list��4�����)*�B��8��?�?�A��B��A��E�?��?�?��?��(�
2�-�)�'
�)�-�-�)�-�2ric��h�K��ddg�2�chc3d{���}|dkDs�|dz��7�6c}Scc}w�wrrrs �rr�z*CoroutineTest.test_comp_4.<locals>.run_set�r r!c��p�K��ddg�2�cic3d{���}|dkDs�|dz|dz��7�6c}Scc}w�wrrrs �rr
z+CoroutineTest.test_comp_4.<locals>.run_dict�s<�����01�2�r�(��F�F�1�q�2�v�A��E�1�q�5�L�F��F�F��F�s(�
6�1�-�+
�-�1�
1�-�1�6rc��n�K�d��ddg�2�}|2�cgc3d{���}|dz��7�
6c}Scc}w�w)Nc�DK�|3d{���}|dkDs�|dz����7�6y�wr�rrs  rrz=CoroutineTest.test_comp_4.<locals>.run_gen.<locals>.<genexpr>�s!����>�>�1�q�2�v�1�q�5�>��>�s � ���� �	 �� rqrcr�rrs  �rrz*CoroutineTest.test_comp_4.<locals>.run_gen�s8�����>��2�r�(��>�C�+.�/�/�a�A��G�/��/�/��/�rrrBrs     @r�test_comp_4zCoroutineTest.test_comp_4{s����	�	@�����h�j�!�
�"��J�	�	@�����g�i� �
�"��J�	�	G�����h�j�!�
�"�b��N�	�	0�	
����g�i� �
�#��K�	rc�X��d���fd�}|jt|��ggd�f��fd�}|jt|��ghd�f��fd�}|jt|��gddd	d�f��fd
�}|jt|��ggd�f�y)Nc�$K�|D]}|����	y�wrrrs  rr�z&CoroutineTest.test_comp_4_2.<locals>.f�rr$c���K��td��2�cgc3d{���}d|cxkrdks�nn|dz��7�6c}Scc}w�w�N�rrrqrrs �rr�z-CoroutineTest.test_comp_4_2.<locals>.run_list��8�����*+�E�!�H�+�C�C�Q��Q����A��F�C��C�C��C��*�A�=�9�7
�9�=�	=�9�=�A)r_r�
c���K��td��2�chc3d{���}d|cxkrdks�nn|dz��7�6c}Scc}w�wr*rrs �rr�z,CoroutineTest.test_comp_4_2.<locals>.run_set�r,r->r_rr.c���K��td��2�cic3d{���}d|cxkrdks�nn	|dz|dz��"7�6c}Scc}w�w)Nr+rrrqr�rrs �rr
z-CoroutineTest.test_comp_4_2.<locals>.run_dict�s@�����34�U�1�X�;�L�L�a�!�a�)�!�)�A��F�A��G�O�L��L�L��L�s.�A�A�=�;
�=�A�
A�=�A�Ar`r��gc��|�K�d��td��2�}|2�cgc3d{���}|dz��7�
6c}Scc}w�w)Nc�VK�|3d{���}d|cxkrdks�nn|dz����!7�6y�w)Nrrrqrrs  rrz?CoroutineTest.test_comp_4_2.<locals>.run_gen.<locals>.<genexpr>�s%����B�B�A��A�	��	�1�r�6�B��B�s �)�'�%�'�)�)�'�)r+r�rrs  �rrz,CoroutineTest.test_comp_4_2.<locals>.run_gen�s8�����B��5��8��B�C�+.�/�/�a�A��G�/��/�/��/�s$�<�7�3�1
�3�7�3�7�<)r�p�qrBrs     @r�
test_comp_4_2zCoroutineTest.test_comp_4_2�s����	�	D�����h�j�!�
���	 �	D�����g�i� �
���	 �	M�����h�j�!�
�c�s��,�-�	/�	0�	
����g�i� �
��!�	#rc�\��d���fd�}|jt|��gdgf�y)Nc�$K�|D]}|����	y�wrrrs  rr�z$CoroutineTest.test_comp_5.<locals>.f�rr$c���K�ddgddgfD��cgc]&}|ddkDs��|�23d{���}|dkDr|dz��c}}S7�6�1cc}}w�w)Nrqrcr��(rr2r)�pairr5r�s  �rr�z+CoroutineTest.test_comp_5.<locals>.run_list�si�����(*�B�x�"�b��&:�6�&:�d�d�1�g��l�#$�T�7�6��a�"�f���E�&:�6�
6�6��6�E��6�s8�A�
A�A�A
�>�A
�
A�A�A
�A�Ar�rB�rr�r�s  @r�test_comp_5zCoroutineTest.test_comp_5�s0���	�	6�	
����h�j�!�
�"��J�	rc�^��d���fd�}|jt|��ggd�f�y)Nc�$K�|D]}|����	y�wrrrs  rr�z$CoroutineTest.test_comp_6.<locals>.f�rr$c��p�K��ddg�2��cgc3d{���}|D]}|dz��	�7�6c}}Scc}}w�w)N�rqrc)r�r2r)�seqr5r�s  �rr�z+CoroutineTest.test_comp_6.<locals>.run_list�sL�����+,�h��->�+?�"�"�C� ����E� ��"��"�
"��"�s$�6�0�+�)�+�0�+�0�
6)r_ri�rBr<s  @r�test_comp_6zCoroutineTest.test_comp_6�s/���	�	"�	
����h�j�!�
���	 rc���d���fd�}|jtd�5t|��ddd�y#1swYyxYw)Nc�4K�d���d���td���w)Nr2r1�aaa)r�rrrr�z$CoroutineTest.test_comp_7.<locals>.f�s�����G��G��E�"�"�s�c��P�K���2�cgc3d{���}|��7�6c}Scc}w�wrrrs �rr�z+CoroutineTest.test_comp_7.<locals>.run_list�s$�����%&�S�)�)��A�)��)�)��)�s$�
&�!��
��!��!�&rG)r�r�r/r<s  @r�test_comp_7zCoroutineTest.test_comp_7�s5���	#�
	*��
#�
#�I�u�
5��h�j�!�6�
5�
5�s	�:�Ac�R�d�}|jt|��ggd�f�y)Nc��4K�dD�cgc]}|��c}Scc}w�wr9rrWs rr�z$CoroutineTest.test_comp_8.<locals>.f�s����(�)�y�!�A�y�)�)��)�s��	�r:rB�rr�s  r�test_comp_8zCoroutineTest.test_comp_8�s'��	*�	
����a�c�N�
��O�	rc�^��d���fd�}|jt|��gddgf�y)Nc� K�d���d���y�wr�rrrrriz&CoroutineTest.test_comp_9.<locals>.gen�s�����G��G�rc��z�K���2�cgc3d{���}|��7�6ncc}w}}|D�cgc]}|��c}Scc}w�wrr)r5�lris  �rr�z$CoroutineTest.test_comp_9.<locals>.f�s;�����"%�%�(�(�Q��(��(��(�A�(� �>�q�!�A�q�>�!��>�s,�
;���
�����;�	6�;r2r1rB�rr�ris  @r�test_comp_9zCoroutineTest.test_comp_9�s1���	�	"�	
����a�c�N�
�!�Q��L�	rc�V�d�}|jt|��gdddd�f�y)Nc��^K�dD�chc]}|��}}|D�cic]}||��c}Scc}wcc}w�wr9r)r5�xxr"s   rr�z%CoroutineTest.test_comp_10.<locals>.f�s;����&�'�Y��!�Y�B�'�"$�%�"�Q�A�q�D�"�%�%��(��%�s�-�	#�-�
(�
-r2r1r
r:rBrLs  r�test_comp_10zCoroutineTest.test_comp_10�s/��	&�	
����a�c�N�
�Q�1��#�$�	&rc��d�}|jt|��gddgddggf�d�}|jt|��gddhddhgf�d�}|jt|��gdd	hf�d
�}|jt|��gddd�ddd�d�f�d
�}|jt|��gddgddggf�d�}|jt|��ggd�f�d�}|jt|��ggd�f�d�}|jt|��gddgddggddgddgggf�y)Nc
��K�dD��cgc]!}tddg�2�cgc3d{���}||z��c}}S7�6ncc}wc}��5cc}}w�w�NrAr2r1�r#��jr5s  r�run_list_inside_listz<CoroutineTest.test_nested_comp.<locals>.run_list_inside_list��@����FN�O�h��)�Q��F�*;�<�<�Q�Q��U�h�O�O�<��<��<��O��7�A�?�6�4�2�4�6�?�A�4�6�
?�Ar_rrirc
��K�dD��cgc]!}tddg�2�chc3d{���}||z��c}}S7�6ncc}wc}��5cc}}w�wrZr[r\s  r�run_set_inside_listz;CoroutineTest.test_nested_comp.<locals>.run_set_inside_listr_r`c��K�dD��chc]*}ttt|��2�cgc3d{���}|��c}}S7�6ncc}wc}���Bcc}}w�w)N�r
r+)r�r#r[r\s  r�run_list_inside_setz;CoroutineTest.test_nested_comp.<locals>.run_list_inside_setsA����IO�P��A�C�)�E�!�H�*=�>�>�Q���P�P�>��>��>�?��P�s;�A� A�?�=�;�=�?�A�A�=�?�A�Ar
rqc��K�dD��cic]#}|tddg�2�cic3d{���}|||z��c}}S7�6ncc}wc}��7cc}}w�wrZr[r\s  r�run_dict_inside_dictz<CoroutineTest.test_nested_comp.<locals>.run_dict_inside_dictsI����LT�U�H�q�A�	�1�a�&�0A�B�B�1��1�q�5��H�U�U�B��B��B�B��U�s;�A�A�8�6�4�6�8�A�A�6�8�
A�A)r2r1rAc��VK�d�dD�}|2�cgc3d{���}|��7�6c}Scc}w�w)Nc�vK�|]!}tddg�2�cgc3d{���}||z��y7�6ncc}wc}����5�w)r2r1Nr[)rr]r5s   rrzNCoroutineTest.test_nested_comp.<locals>.run_list_inside_gen.<locals>.<genexpr>s6����N�X���A�q�6�):�;�;�A�A��E�X�;��;��;�;�s(�9�-�+�)�+�-�9�+�-�
9rAr)rir"s  r�run_list_inside_genz;CoroutineTest.test_nested_comp.<locals>.run_list_inside_gens+����N�X�N�C�%(�)�)��A�)��)�)��)�s$�)�$� �
� �$� �$�)c	��K�dD�cgc]}d�tt|��2���}}|D��cgc]}|23d{���}|��c}}Scc}w7�6�cc}}w�w)Nrdc�2K�|3d{���}|����7�
6y�wrrrs  rrzNCoroutineTest.test_nested_comp.<locals>.run_gen_inside_list.<locals>.<genexpr>�����:�:��Q�:��:����������r#r[)r]�gensr�r"s    r�run_gen_inside_listz;CoroutineTest.test_nested_comp.<locals>.run_gen_inside_listsW����DJ�K�F�q�:�i��a��&9�:�F�D�K�#�5�t�!�1�5�a�A�t�5�5��L�5��5�A��5�s@�A�"A�A�A�A
�A
�A
�A�	A�
A
�A�A)rr2r1rr2r1r
rc��jK�d�dD�}|D��cgc]}|23d{���}|��c}}S7�6�cc}}w�w)Nc3�RK�|]}d�tt|��2����!y�w)c�2K�|3d{���}|����7�
6y�wrrrs  rrzWCoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen.<locals>.<genexpr>.<genexpr>!rmrnNro)rr]s  rrzMCoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen.<locals>.<genexpr>!s ����K�F�q�:�i��a��&9�:�F�s�%'rdr)rpr�r"s   r�run_gen_inside_genz:CoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen s8����K�F�K�D�#�5�t�!�1�5�a�A�t�5�5�5��5�A��5�s(�3�-�+
�)�+
�-�3�+
�-�3c���K�dD���cgc]4}dD��cgc]$}tddg�2�cgc3d{���}||z|z��c}}��6c}}}S7�6ncc}wc}��?cc}}wcc}}}w�w)N)r�rhrAr2r1r[)�kr]r5s   r� run_list_inside_list_inside_listzHCoroutineTest.test_nested_comp.<locals>.run_list_inside_list_inside_list'sp����(�)�'��'�(�&��09�!�Q��/@�A�A�!�a�!�e�a�i�&�(�'�)�
)�A��A��A��(��)�sV�A!�
A�A�A�A	�A�A	�
A�A�A�A!�A	�	A�

A�A�A!rr4r�z��������rB)	rr^rbrergrjrqrurxs	         r�test_nested_compzCoroutineTest.test_nested_comp�s���	P�����*�,�-�
�2�r�(�R��H�%�&�	(�	P�����)�+�,�
�2�r�(�R��H�%�&�	(�	Q�����)�+�,�
�!�R��M�	�	V�����*�,�-�
�"��n�b�R�.�9�:�	<�	*�	
����)�+�,�
�2�r�(�R��H�%�&�	(�	6�	
����)�+�,�
�)�*�	,�	6�	
����(�*�+�
�)�*�	,�	)�	
����6�8�9�
�C��:��S�z�*�c�3�Z�#�s��,D�E�F�	Hrc��d�}|�}|jt�5tj|�ddd�|j�}	|jt�5tj|�ddd�|j	�y#1swY�^xYw#1swY�&xYw#|j	�wxYw)Nc��K�y�wrrrrrr�z%CoroutineTest.test_copy.<locals>.func0r�rs)rGr��copyrr�)rr�r+r4s    r�	test_copyzCoroutineTest.test_copy/s�����v��
�
�
�y�
)��I�I�d�O�*��^�^�
��	��"�"�9�-��	�	�"�
�.�
�H�H�J�*�
)��
.�-��
�H�H�J�s/�B�B+�$B�:B+�B�B(�$B+�+B=c�J�d�}|�}ttjdz�D]F}|jttj
f�5tj||�ddd��H|j�}	ttjdz�D]F}|jttj
f�5tj||�ddd��H	|j�y#1swY��xYw#1swY�pxYw#|j�wxYw)Nc��K�y�wrrrrrr�z'CoroutineTest.test_pickle.<locals>.func=r�rsr2)	r[�pickle�HIGHEST_PROTOCOLrGr��
PicklingError�dumpsrr�)rr�r+�protor4s     r�test_picklezCoroutineTest.test_pickle<s�����v���6�2�2�Q�6�7�E��"�"�I�v�/C�/C�#D�E����T�5�)�F�E�8��^�^�
��	��v�6�6��:�;���&�&�	�6�3G�3G�'H�I��L�L��U�+�J�I�<�
�H�H�J�F�E��J�I��
�H�H�J�s1�C8�AD�D�
D�8D	�D
	�	D�D"c���d�}tj�5tj�5}tjd�|�}t|�}d}tj�|jdt|jj��|jt|jj�|�ddd�ddd�y#1swY�xYw#1swYyxYw)Nc��K�y�wrrrrrr�z3CoroutineTest.test_fatal_coro_warning.<locals>.funcMr�rsr�zwas never awaited)
r9r:r�catch_unraisable_exception�filterwarningsr�r<r��str�
unraisable�	exc_valuer^�object)rr�rCr+�	coro_reprs     r�test_fatal_coro_warningz%CoroutineTest.test_fatal_coro_warningKs����
�
$�
$�
&�
�
/�
/�
1�R��#�#�G�,��6�D��T�
�I��D���� ��M�M�-�s�2�=�=�3J�3J�/K�L����T�"�-�-�"6�"6�7��C�2�'�
&�
1�
1��'�
&�s#�C&�BC�	C&�C#	�C&�&C/c�(����Gd�d�}|��d�����fd�}�jt|��gdf����fd�}�jt|��gdf����fd�}�jt|��gdf�y)Nc��eZdZd�Zy)�MCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTargetc��td��r>�rV)r�keyrs   r�__setitem__zYCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTarget.__setitem__\�
��(��,�,rN)rrrr�rrr�	BadTargetr�[���
-rr�c�K�d���y�wrprrrr�sourcezJCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.source_s�����H�r�c����K��jt�5}��23d{����d<�
7�6	ddd�n#1swYnxYw�jjjd�y�w�Nr�r?re�rGrVr^r�r*�rCrr��tgts ���r�run_forzKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_forbs^������"�"�#5�6�"�$*�H��#�a�&����H�7�6�6��
���R�\�\�.�.��6���1�A.�;�0�.�0�;�0�;�	A.�A�.A.rec����K��jt�5}��2gc3d{����d<d��7�
6cddd�S#1swYnxYw�jjjd�y�wr�r�r�s ���rr�zLCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_listjs[������"�"�#5�6�"�.4�h�7�7�C��F��7��7�7�6�6�����R�\�\�.�.��6��s1�A2�
?�4�2
�4�?�4�?�
A2�A�.A2c��p�K��fd���2�}|jd�}�jt�5}|�d{���ddd��jjj
t��j|jj
jd�y7�g#1swY�fxYw�w)Nc�:�K�|3d{����d<d����7�
6y�wr&r)rr�s �rrz^CoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_gen.<locals>.<genexpr>rs�����2�2�s�1�v�1�2��2�s�����
��r�re�	�asendrGr�rvr�r�rVr^r*)rir�rCrr�r�s   ���rrzKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_genqs������2���2�C��	�	�$��A��"�"�<�0�B����1��!�!�"�,�,�"8�"8�:L�M����R�\�\�3�3�8�8�%�@����1�0�s/�7B6�B*�B(�B*�A#B6�(B*�*B3�/B6rB)rr�r�r�rr�r�s`    @@r�,test_for_assign_raising_stop_async_iterationz:CoroutineTest.test_for_assign_raising_stop_async_iterationZs����	-�	-��k��	�	�	
����7�9�-��E�{�;�	�
	
����8�:�.��U��<�	�	
����7�9�-��E�{�;rc�����Gd�d���fd����fd�}�jt|��gdf���fd�}�jt|��gdf���fd�}�jt|��gdf�y)Nc��eZdZd�Zy)�QCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterablec��td��r>r�rs rr�zZCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterable.__iter__}r�rN)rrrr�rrr�BadIterabler�|r�rr�c�"�K������y�wrr)r�s�r�badpairszNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.badpairss������-��s�c����K��jt�5}��23d{���\}}�
7�6	ddd�n#1swYnxYw�jjjd�y�w)Nr�rer��rCr5r]r�rs   ��rr�zMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_for�s^������"�"�#5�6�"�"*�*��$�!�Q����*�7�6�6��
���R�\�\�.�.��6��r�rec���K��jt�5}��2��cgc3d{���\}}d��7�
6ncc}}wc}}cddd�S#1swYnxYw�jjjd�y�wr�r�r�s   ��rr�zNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_list�s_������"�"�#5�6�"�,4�J�7�7�D�A�q��7��7��7�7�6�6�����R�\�\�.�.��6��s=�A?�A�9�7
�5�7
�9�7
�9�
A�
A?�A�.A?c��l�K�d���2�}|jd�}�jt�5}|�d{���ddd��jjj
t��j|jj
jd�y7�g#1swY�fxYw�w)Nc�8K�|3d{���\}}d����7�
6y�wr&r)rr5r]s   rrz`CoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_gen.<locals>.<genexpr>�s����2�2�t�q�!�1�2��2�rr�rer�)rir�rCr�rs   ��rrzMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_gen�s������2�x�z�2�C��	�	�$��A��"�"�<�0�B����1��!�!�"�,�,�"8�"8�:L�M����R�\�\�3�3�8�8�%�@����1�0�s-�5B4�B(�B&�B(�A#B4�&B(�(B1�-B4rB)rr�r�rr�r�s`   @@r�.test_for_assign_raising_stop_async_iteration_2z<CoroutineTest.test_for_assign_raising_stop_async_iteration_2{sx���	-�	-�	 �	�	
����7�9�-��E�{�;�	�
	
����8�:�.��U��<�	�	
����7�9�-��E�{�;rc��d�}|jt�5|�j}ddd�j�y#1swY�xYw)�*This would crash the interpreter in 3.11a2c��K�y�wrrrrrr�z)CoroutineTest.test_bpo_45813_1.<locals>.f�r�rsN)r�r��cr_frame�clear)rr��frames   r�test_bpo_45813_1zCoroutineTest.test_bpo_45813_1�s7��	�
�
�
�n�
-��C�L�L�E�.�
���
�.�
-�s�A�A
c��d�}|�}|jt�5|jj�ddd�|j	�y#1swY�xYw)r�c��K�y�wrrrrrr�z)CoroutineTest.test_bpo_45813_2.<locals>.f�r�rsN)r�r�r�r�r�rRs   r�test_bpo_45813_2zCoroutineTest.test_bpo_45813_2�sC��	��c��
�
�
�n�
-��L�L��� �.��	�	��.�
-�s�A�Ac��d�}|�}|j|j�|j�|j|j�y)Nc��K�y�wrrrrrr�z2CoroutineTest.test_cr_frame_after_close.<locals>.f�r�rs)�assertIsNotNoner�r�rrRs   r�test_cr_frame_after_closez'CoroutineTest.test_cr_frame_after_close�s;��	��c�����S�\�\�*��	�	�����#�,�,�'rc������fd�}�fd��tjd���|�}|jd�}|jt�}|j||�y)Nc��.�K����d{���S7��wrrrqs�rr�z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.a���������9��9�rAc��.�K����d{���S7��wrrr�s�rr!z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.b�r�rAc3�K�	ttj����y#t$r"ttj����YywxYw�wr)r��	traceback�
extract_stackr�rrrr�z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.c�sA����
5��)�1�1�3�4�4��$�
5��)�1�1�3�4�4�
5�s%�A�$�A�(A�A�A�A)rwr�r(r�r�r^)rr�r+�len_send�	len_throwr!r�s     @@r�test_stack_in_coroutine_throwz+CoroutineTest.test_stack_in_coroutine_throw�sZ���	�	�
���	5�
�	5��s���9�9�T�?���J�J�0�1�	�����9�-rN)Wrrrrmr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr'r.r3r6r;rCrOrXr^rerur{r�r�r�r�r�r�r�r�r�r�r�r�rrr'r1r9rDrLrmryr�r�r�r�r�r�r�r�r�rrr&r6r=rDrIrMrSrWr~r�r�r�r�r�r�r�r�r�rrrrfrf
s���4�M�"���:/�0
�� 
�!�,(G�T��
�
�,�"+�>�.&�P%�<.�.�+�<
���G�5��9�	8�	�7�,
5�
C��$� '�D$�$
.�&�P,� ,� 
,��&�&K�4=!�@!�(D�4E�,�$!�*F3�P
<�>�(>�.Z&�x!�!�$@�('�.'�.F�*�@�<�<#�<
� �
"��
�&�4H�l�
�
D�<�B<�@��(�.rrfz0asyncio does not work under Emscripten/WASI yet.c��eZdZd�Zy)�CoroAsyncIOCompatTestc������tjd��Gd�dt��g�G��fd�d������fd�}�j�}�j	|�	|j|��|j
��jd�|j�gd��y#�$rY�=wxYw#|j
��jd�wxYw)N�asyncioc��eZdZy)�9CoroAsyncIOCompatTest.test_asyncio_1.<locals>.MyExceptionNrbrrr�MyExceptionr��rcrr�c�&��eZdZ��fd�Z��fd�Zy)�0CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CMc���K��jd��jd��d{����jd�|S7��w)Nr2�{�G�z�?r1)r'�sleep)rr�r,s ��rr�z;CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aenter__�s;������
�
�a� ��m�m�D�)�)�)��
�
�a� ���*�s�&A�A�Ac��z�K��jd��d{����j|j�y7� �w)Nr�)r�r'r)r�exc_type�exc_val�exc_tbr�r,s    ��rr�z:CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aexit__�s0������m�m�D�)�)�)��
�
�h�/�/�0�*�s�;�9�!;Nr�)r�r,s��rr�r��s
���
�
1rr�c���K���4�d{���}�jd��d{�����7�7�#1�d{���7swYnxYw�jd�y�w)Nr��unreachable)r�r')r�r�r�r�r,s ����rr�z/CoroAsyncIOCompatTest.test_asyncio_1.<locals>.f�sJ������t�t�q��m�m�D�)�)�)�!�!���)���t�t��
�M�M�-�(�s7�A�/�A�3�1�3�A�3�A�<�A�A)r2r1r�)	r�
import_moduler��new_event_loop�set_event_loop�run_until_completer��set_event_loop_policyr^)rr��loopr�r�r�r,s   @@@@r�test_asyncio_1z$CoroAsyncIOCompatTest.test_asyncio_1�s���� �-�-�i�8��	�)�	���		1�		1�	)��%�%�'�����t�$�	0��#�#�A�C�(�
�J�J�L��)�)�$�/�����!6�7��
�	��	��
�J�J�L��)�)�$�/�s$�"B.�.B6�3B9�5B6�6B9�9#CN)rrrr�rrrr�r��s��%8rr�c�$�eZdZd�Zd�Zd�Zd�Zy)�OriginTrackingTestc��tjtj�j�}|j|j
fSr)r`�getframeinfo�currentframe�f_back�filename�lineno)r�infos  r�herezOriginTrackingTest.here�s4���#�#�G�$8�$8�$:�$A�$A�B���
�
�t�{�{�+�+rc�����tj�}	d��tjd��jtj�d�t	j
���5}�j
|j�ddd�tjd��jtj�d��j�\}}t	j
���5}�j|j||dzdff�ddd�tjd��jtj�d���fd�}�j�\}}|�\\}}}t	j
|�5�j|j||df||dzdff�ddd�tjd�t	j
���5}�jdt|j�cxkxrdknc�ddd��jt�5tjd	�ddd��jtj�d�tj|�y#1swY��xYw#1swY���xYw#1swY��xYw#1swY��xYw#1swY�uxYw#tj|�wxYw)
Nc��K�y�wrrrrr�corofnz7OriginTrackingTest.test_origin_tracking.<locals>.corofn	r�rsrr2�test_origin_trackingr1c�2���j���fSr)r�)r�rs��r�nestedz7OriginTrackingTest.test_origin_tracking.<locals>.nested	s����	�	��V�X�.�.rr�rp���)
rv�#get_coroutine_origin_tracking_depth�#set_coroutine_origin_tracking_depthr^�
contextlib�closingr�	cr_originr�r_r�rGr�)	r�
orig_depthr+�fnamer�r��nested_fname�
nested_linenor�s	`       @rr�z'OriginTrackingTest.test_origin_tracking�sL����<�<�>�
�*	@�
�
�3�3�A�6����S�D�D�F��J��#�#�F�H�-���!�!�$�.�.�1�.�
�3�3�A�6����S�D�D�F��J� �I�I�K�M�E�6��#�#�F�H�-��� � ����#(�&�1�*�6L�"M�!O�Q�.�
�3�3�A�6����S�D�D�F��J�
/� �I�I�K�M�E�6�4:�H�1�
*�l�M�D��#�#�D�)�� � ����#/���"I�#(�&�1�*�6L�"M�"O�P�*�
�3�3�D�9��#�#�F�H�-������C����$7� >�$� >�?�.��"�"�:�.��7�7��;�/�
���S�D�D�F��M�
�3�3�J�?�G.�-��.�-��*�)��.�-��/�.��
�3�3�J�?�s��AK�.J�
A.K�8$J,�A<K�(J9�7K�73K�*K�K�,K�J)�$K�,J6�1K�9K�>K�K�
K�K�K�K4c����	�
�d��
�j�\}}�
fd��|dz
}�j�\}}�fd��	|dz
}�	�fd�}tj�}	|dd�
j�d��}|d	d
j	d�
j�d�dd
|�d|�d�dg��|dd
j	d�
j�d�dd
|�d|�d�dd
|�d|�d�dg��tj
|�y#tj
|�wxYw)Nc��K�y�wrrrrrr�z?OriginTrackingTest.test_origin_tracking_warning.<locals>.corofn.	r�rsc�����Srr)r�s�r�a1z;OriginTrackingTest.test_origin_tracking_warning.<locals>.a12	s
����8�Orr1c�����Srr)r
s�r�a2z;OriginTrackingTest.test_origin_tracking_warning.<locals>.a27	s
����4�Krc���tj|��jt�5}��t	j
�ddd��j
|tj��y#1swY�/xYwr)	rvr�r�r�rr<r^r��warning)�depth�msgrCrrs   ��rr�z>OriginTrackingTest.test_origin_tracking_warning.<locals>.check;	sZ����3�3�E�:��!�!�.�1�R����"�"�$�2�
���S�#�b�j�j�/�2�2�1�s�A6�6A?rzcoroutine 'z' was never awaitedr2r�z' was never awaited
z-Coroutine created at (most recent call last)
z  File "z", line z, in a1
z$    return corofn()  # comment in a1z, in a2
z!    return a1()  # comment in a2
)r�rvr�rr]r�)r�a1_filename�	a1_lineno�a2_filename�	a2_linenor�rrr
rr�s`       @@@r�test_origin_tracking_warningz/OriginTrackingTest.test_origin_tracking_warning-	s@���	�"&������Y�	��Q��	�!%������Y�	��Q��	�	3��<�<�>�
�	@���[��)<�)<�(=�=P�Q�R�C��!�R�W�W��f�1�1�2�2G�H�@��;�-�x�	�{�)�D�6�	��
�
�!�R�W�W��f�1�1�2�2G�H�@��;�-�x�	�{�)�D�4��;�-�x�	�{�)�D�6�
��
�
�3�3�J�?��C�3�3�J�?�s
�BC5�5Dc���d�}tj}	d�t_tj�5}t	j
dtf�5|�}t|�}~tj�|jt|jj�|�|j|jjt�ddd�ddd�t`t	j
dtf�5|�tj�ddd�|t_y#1swY�bxYw#1swY�fxYw#1swY�-xYw#|t_wxYw)Nc��K�y�wrrrrrr�zLOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.corofn[	r�rsc��ddzSrrr�s rr�zNOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.<lambda>`	s��a��crzcoroutine .* was never awaited)r9�_warn_unawaited_coroutinerr�r�check_warningsr�r�r<r^r�r�r�r�)rr��orig_wucrCr+r�s      r�)test_unawaited_warning_when_module_brokenz<OriginTrackingTest.test_unawaited_warning_when_module_brokenW	s��	��5�5��	:�1A�H�.��3�3�5�� �/�/�;�(�*�+��x�� ��J�	���"�"�$�� � ��b�m�m�&:�&:�!;�Y�G�� � ����!7�!7�9J�K�+�6��2� �/�/�6��G�I����"�"�$�I�2:�H�.�++�+��6�5�� I�I��2:�H�.�sS� E�D?�BD3�D?�)E�E�E�3D<	�8D?�?E�E�E�E�
E$N)rrrr�r�rrrrrr�r��s��,�,@�\(@�T :rr�c��eZdZd�Zy)�"UnawaitedWarningDuringShutdownTestc�X�d}td|�d}td|�d}td|�y)NzWimport asyncio
async def f(): pass
async def t(): asyncio.gather(f())
asyncio.run(t())
z-cz.import sys
async def f(): pass
sys.coro = f()
zYimport sys
async def f(): pass
sys.corocycle = [f()]
sys.corocycle.append(sys.corocycle)
r)rrBs  r�&test_unawaited_warning_during_shutdownzIUnawaitedWarningDuringShutdownTest.test_unawaited_warning_during_shutdown|	s;��%��	��t�$�#��	��t�$�8��	��t�$rN)rrrr rrrrrz	s��%rrc��eZdZd�Zd�Zd�Zy)�CAPITestc�h��ddlm��fd�}|j|�jd�d�y)Nr��	awaitTypec��H�K��tdg��}|�d{���S7��wr�rV��future�ats �rrZz%CAPITest.test_tp_await_1.<locals>.foo�	s �������a�S�	�]�F� �L�!�L�s�"� �"r2)�	_testcapir%r^r(�rrZr)s  @r�test_tp_await_1zCAPITest.test_tp_await_1�	s(���-�	"�	
�������D�)�1�-rc��ddlm}|tdg��}|jt	|j��d�y)Nrr$r2)r*r%r�r^r3r)rr)r(s   r�test_tp_await_2zCAPITest.test_tp_await_2�	s2��-��D�!��I�������f�.�.�0�1�1�5rc���ddlm��fd�}|jtd�5|j	|�jd�d�ddd�y#1swYyxYw)Nrr$c��4�K��d�}|�d{���S7��wr�rr's �rrZz%CAPITest.test_tp_await_3.<locals>.foo�	s�������U�F� �L�!�L�s���z.__await__.*returned non-iterator of type 'int'r2)r*r%r�r�r^r(r+s  @r�test_tp_await_3zCAPITest.test_tp_await_3�	sP���-�	"��
#�
#��K�M����S�U�Z�Z��-�q�1�M�M�M�s�'A�AN)rrrr,r.r1rrrr"r"�	s��.�6�	2rr"�__main__)%rr�r`r�rvrwr��unittestr9�testr�test.supportrr�test.support.script_helperrr	rr#r/r6�contextmanagerr=�TestCaser?rUrf�skipIf�
is_emscripten�is_wasir�r�r�cpython_onlyr"rr�rrr�<module>r=sQ�����
�
������&�(�7��������&������b0��*�*�b0�J
@��)�)�@�,.�H�%�%�.�D6�������,�W�_�_�6��'8�H�-�-�'8�	�'8�T}:��*�*�}:�@%��):�):�%�*	���2�x� � �2��2�:�Z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists