HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/__pycache__/test_coroutines.cpython-311.opt-2.pyc
�

��Vc6��|�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlmZGd�d��ZGd�d	��Zd
�Zd�Zd�Zejd
���ZGd�dej��ZGd�dej��ZGd�dej��Zeje
jpe
jd��Gd�dej����ZGd�dej��ZGd�dej��Z e
j!Gd�dej����Z"e#dkrej$��dSdS)�N)�support)�
import_helper)�warnings_helper��assert_python_okc��eZdZd�Zd�ZdS)�AsyncYieldFromc��||_dS�N��obj)�selfr
s  �(D:\Python311\Lib\test\test_coroutines.py�__init__zAsyncYieldFrom.__init__s
�������c#�$K�|jEd{V��dSrr�rs r�	__await__zAsyncYieldFrom.__await__s&�����8���������rN��__name__�
__module__�__qualname__rr�rrr	r	s2�������������rr	c��eZdZd�Zd�ZdS)�
AsyncYieldc��||_dSr��value)rrs  rrzAsyncYield.__init__s
����
�
�
rc#�K�|jV�dSrrrs rrzAsyncYield.__await__s�����j�����rNrrrrrrs2�������������rrc� K�	|D]}|WV��dSrr)�iterable�xs  r�	asynciterr# s/����:�
�����������rc���g}d}		|�|�d����n-#t$r }|jr
|jdnd}Yd}~n	d}~wwxYw�X||fS)NTr)�append�send�
StopIteration�args)�coro�buffer�result�exs    r�	run_asyncr-&s����F�
�F��	��M�M�$�)�)�D�/�/�*�*�*�*���	�	�	�#%�7�4�R�W�Q�Z�Z��F��E�E�E�E�����	������6�>�s�(0�
A�A�Ac�J�|���}g}d}d}		|dzr#|�t|����n(|�|�d����|dz
}n-#t$r }|jr
|jdnd}Yd}~n	d}~wwxYw��||fS)NrT��)rr%�nextr&r'r()r)�awr*r+�ir,s      r�run_async__await__r44s���	
���	�	�B�
�F�
�F�	�A�	�	��1�u�
-��
�
�d�2�h�h�'�'�'�'��
�
�b�g�g�d�m�m�,�,�,�
��F�A�A���	�	�	�#%�7�4�R�W�Q�Z�Z��F��E�E�E�E�����	����	��6�>�s�AA3�3
B�=B�Bc#�K�tj��5tjd��dV�tj��ddd��dS#1swxYwYdS)N�ignore)�warnings�catch_warnings�simplefilterr�
gc_collectrrr�silence_coro_gcr;Gs�����	�	 �	"�	"�����h�'�'�'�
�����������������������������s�,A�A�Ac�&�eZdZd�Zd�Zd�Zd�ZdS)�AsyncBadSyntaxTestc��gd�}|D]s}|�|���5|�t��5t|dd��ddd��n#1swxYwYddd��n#1swxYwY�tdS)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�samplesr@s   r�test_badsyntax_1z#AsyncBadSyntaxTest.test_badsyntax_1Qs��~�~�~��@
�	0�	0�D����4��(�(�
0�
0�$�*;�*;�K�*H�*H�
0�
0���h��/�/�/�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0��	0�	0�4�A/�A�A/�A�A/�A� A/�/A3	�6A3	c��gd�}|D]s}|�|���5|�t��5t|dd��ddd��n#1swxYwYddd��n#1swxYwY�tdS)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)r?rArBrCrHs   r�test_badsyntax_2z#AsyncBadSyntaxTest.test_badsyntax_2�s�� 
� 
� 
��D�	0�	0�D����4��(�(�
0�
0�$�*;�*;�K�*H�*H�
0�
0���h��/�/�/�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0��	0�	0rKc��|�t��5tddd��ddd��dS#1swxYwYdS)Nz	async = 1rArB)rErFrGrs r�test_badsyntax_3z#AsyncBadSyntaxTest.test_badsyntax_3�s���
�
�
�{�
+�
+�	3�	3��K��6�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�	3�	3s
�:�>�>c��gd�}|D]s}|�|���5|�t��5t|dd��ddd��n#1swxYwYddd��n#1swxYwY�tdS)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
            r?rArBrCrHs   r�test_badsyntax_4z#AsyncBadSyntaxTest.test_badsyntax_4�s��+
�+
�+
��Z�	0�	0�D����4��(�(�
0�
0�$�*;�*;�K�*H�*H�
0�
0���h��/�/�/�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0��	0�	0rKN)rrrrJrMrOrQrrrr=r=OsU������C0�C0�C0�J
%0�%0�%0�N3�3�3�00�00�00�00�00rr=c��eZdZd�ZdS)�TokenizerRegrTestc���g}td��D]+}|�d�|������,d�|��}i}t	|||��|�|d��d��|dz
}i}t	|||��|�|d��d��|�tj|d����dS)	Ni�zdef i{i}(): return {i}�r3�
�i499i�z
async def foo():
    return�foo)	�ranger%�format�joinrB�assertEqual�
assertTrue�inspect�iscoroutinefunction)r�bufr3�nss    r�test_oneline_defsz#TokenizerRegrTest.test_oneline_defs�s������s���	=�	=�A��J�J�/�6�6��6�;�;�<�<�<�<��i�i��n�n�����S�"�b���������F����s�+�+�+�	�/�/��
���S�"�b���������F����s�+�+�+�����3�B�u�I�>�>�?�?�?�?�?rN)rrrrbrrrrSrS�s(������@�@�@�@�@rrSc��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�ZUdTS)U�
CoroutineTestc�R�d�}|�t|d����dS)Nc3�K�dV�dSrrrrr�genz%CoroutineTest.test_gen_1.<locals>.gen
s����5�5�5�5�5�5rr)�assertFalse�hasattr)rrgs  r�
test_gen_1zCoroutineTest.test_gen_1s/����������k�2�2�3�3�3�3�3rc�D�d�}|��}|�|tj��|�t	|jjtjz����|�	t	|jjtj
z����|�t	|jjtjz����|�	t	|jjtj
z����|�t|��gdf��|�t|����gdf��d�}|�	t	|jjtjz����dS)Nc��
K�dS�N�
rrrrrXz&CoroutineTest.test_func_1.<locals>.foo������2rrnc��dSrrrrr�barz&CoroutineTest.test_func_1.<locals>.bars���r)�assertIsInstance�types�
CoroutineTyper]�bool�__code__�co_flagsr^�CO_COROUTINErh�CO_GENERATOR�cr_coder\r-r4�rrX�frqs    r�test_func_1zCoroutineTest.test_func_1sV��	�	�	�
�C�E�E�����a��!4�5�5�5�����S�\�2�W�5I�I�J�J�K�K�K�����c�l�3�g�6J�J�K�K�L�L�L�����Q�Y�/�'�2F�F�G�G�H�H�H�����a�i�0�7�3G�G�H�H�I�I�I�����1����B�x�0�0�0����+�C�C�E�E�2�2�R��H�=�=�=��������c�l�3�g�6J�J�K�K�L�L�L�L�Lrc��d�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��K�t�r�r'rrrrXz&CoroutineTest.test_func_2.<locals>.foo"������rzcoroutine raised StopIteration)�assertRaisesRegex�RuntimeErrorr-�rrXs  r�test_func_2zCoroutineTest.test_func_2!s���	 �	 �	 ��
#�
#��>�@�@�	�	�
�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	��A�A�Ac��d�}|��}|�t|��d��|���dS)Nc��K�t�rr�rrrrXz&CoroutineTest.test_func_3.<locals>.foo+r�rz^<coroutine object.* at 0x.*>$)�assertRegex�repr�close)rrXr)s   r�test_func_3zCoroutineTest.test_func_3*sL��	 �	 �	 ��s�u�u������d���%E�F�F�F��
�
�����rc���d�}|��}�fd�}|��5t|��ddd��n#1swxYwY|��5t|��ddd��n#1swxYwY|��5t|��ddd��n#1swxYwY|��5t|��ddd��n#1swxYwY|��5|D]}�	ddd��n#1swxYwY|��5d�|D��ddd��n#1swxYwY|���dS)Nc��K�t�rr�rrrrXz&CoroutineTest.test_func_4.<locals>.foo3r�rc�:����td��S�Nz"'coroutine' object is not iterable�r��	TypeErrorrs�r�<lambda>z+CoroutineTest.test_func_4.<locals>.<lambda>7�����.�.��;�=�=�rc��g|]}|��Srr��.0r3s  r�
<listcomp>z-CoroutineTest.test_func_4.<locals>.<listcomp>Ks�����1�Q���r)�list�tuple�sum�iterr�)rrXr)�checkr3s`    r�test_func_4zCoroutineTest.test_func_42s����	 �	 �	 ��s�u�u��=�=�=�=���U�W�W�	�	���J�J�J�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��U�W�W�	�	��$�K�K�K�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��U�W�W�	�	���I�I�I�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��U�W�W�	�	���J�J�J�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��U�W�W�	�	��
�
���
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��U�W�W�	�	��������	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�
�
�����sg�:�>�>�A+�+A/�2A/�B�B �#B �1C
�
C�C�"C5�5C9�<C9�

D#�#D'�*D'c�2���tjd�����fd�}�fd�}|��}|��5|D]}�	ddd��n#1swxYwY|������D]}��|d�����d����D��dg����t	�����d����tt
�������d��dS)Nc3�K�dV�dS�Nr0rrrrrqz&CoroutineTest.test_func_5.<locals>.barPs�����G�G�G�G�Grc��,�K�����d{V��dSrr�rqs�rrXz&CoroutineTest.test_func_5.<locals>.fooT�"������#�%�%�K�K�K�K�K�K�K�K�Krc�:����td��Sr�r�rs�rr�z+CoroutineTest.test_func_5.<locals>.<lambda>Wr�rr0c��g|]}|��Srr)r��els  rr�z-CoroutineTest.test_func_5.<locals>.<listcomp>cs��-�-�-��"�-�-�-r)r0)rs�	coroutiner�r\r�r1r�)rrXr�r)r�rqs`    @r�test_func_5zCoroutineTest.test_func_5Os�����	��	�	�
��	�	�	�	�	�	�=�=�=�=���s�u�u��
�U�W�W�	�	��
�
���
�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�
�
�����#�%�%�	$�	$�B����R��#�#�#�#����-�-�s�s�u�u�-�-�-��s�3�3�3�����s�s�u�u���t�,�,�,�����d�3�3�5�5�k�k�*�*�A�.�.�.�.�.s�A	�	A
�A
c���tjd�����fd�}|��}|�|�d��d��|�|�d��d��|�t
��5|�d��ddd��dS#1swxYwYdS)Nc3�K�dV�dV�dS�Nr0r/rrrrrqz&CoroutineTest.test_func_6.<locals>.barhs�����G�G�G��G�G�G�G�Grc��,�K�����d{V��dSrrr�s�rrXz&CoroutineTest.test_func_6.<locals>.foomr�rr0r/)rsr�r\r&rEr'r{s   @r�test_func_6zCoroutineTest.test_func_6gs���	��	�	�
��	�	�	�	�	�	�
�C�E�E�����������q�)�)�)����������q�)�)�)�
�
�
�}�
-�
-�	�	�
�F�F�4�L�L�L�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�B5�5B9�<B9c����d�}|����fd�}|�td��5t|����ddd��n#1swxYwY����dS)Nc��
K�dSrmrrrrrqz&CoroutineTest.test_func_7.<locals>.barwrorc3��K��Ed{V��dSrr�r)s�rrXz&CoroutineTest.test_func_7.<locals>.foo{s������O�O�O�O�O�O�O�O�OrzCcannot 'yield from' a coroutine object in a non-coroutine generator)r�r�r�r��rrqrXr)s   @r�test_func_7zCoroutineTest.test_func_7vs����	�	�	��s�u�u��	�	�	�	�	��
#�
#��,�-�-�	�	�
�����K�K�K�		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
�
�
�����s�A�A�Ac����tj�fd���}d�}|���|�t|����gdf������dS)Nc3��K��Ed{V��Srrr�s�rrqz&CoroutineTest.test_func_8.<locals>.bar�s�����#�O�O�O�O�O�O�$rc��
K�dS�N�spamrrrrrXz&CoroutineTest.test_func_8.<locals>.foo�������6rr�)rsr�r\r-r�r�s   @r�test_func_8zCoroutineTest.test_func_8�s}���	��	%�	%�	%�	%�
��	%�	�	�	��s�u�u������3�3�5�5�)�)�B��<�8�8�8��
�
�����rc��d�}|�td��5|��tj��ddd��n#1swxYwY|�td��5|�t
��5|��D]}�	ddd��n#1swxYwYtj��ddd��dS#1swxYwYdS)Nc��
K�dSrrrrrrXz&CoroutineTest.test_func_9.<locals>.foo�������Drz0coroutine '.*test_func_9.*foo' was never awaited)�assertWarnsRegex�RuntimeWarningrr:rEr�)rrX�_s   r�test_func_9zCoroutineTest.test_func_9�s���	�	�	��
"�
"��C�E�E�	!�	!�
�C�E�E�E��� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!��
"�
"��C�E�E�		!�		!��"�"�9�-�-�
�
�������A���
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�

�� � � �		!�		!�		!�		!�		!�		!�		!�		!�		!�		!�		!�		!����		!�		!�		!�		!�		!�		!sG�A	�	A
�A
�/C�
B%�C�%B)	�)C�,B)	�-C�C�Cc�����d�tj�fd�����fd�}|��}|���}|�|t	|����t|��|�|�d��d��|��d��|���|��d��|��}|���}t|��|�	t��5|�tdd��ddd��n#1swxYwY|��d��dS)Nrc3�n�K�	dV�}|dzV�n#t$r�dz
��wxYw	�dz
�dS#�dz
�wxYw)Nr/�dr0��ZeroDivisionError)�a�Ns �rrgz'CoroutineTest.test_func_10.<locals>.gen�sp�����
��E�E���A�v������$�
�
�
��S����
�����
�Q�������Q������s��-�"�-�4c��,�K�����d{V��dSrr�rgs�rrXz'CoroutineTest.test_func_10.<locals>.foo�r�rrnr�r0�f)rsr�r�assertIsr�r1r\r&r�rEr��throw)rrXr)r2r�rgs    @@r�test_func_10zCoroutineTest.test_func_10�s�����
��	��		�		�		�		�
��		�	�	�	�	�	��s�u�u��
�^�^�
�
���
�
�b�$�r�(�(�#�#�#��R�������������c�*�*�*�����A����
���
�
�
�����A�����s�u�u��
�^�^�
�
���R����
�
�
�0�
1�
1�	4�	4��H�H�&��d�3�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�����C� � � � � s�!E
�
E�Ec�b�d�}|��}|�dt|����|�dt|�������|�dt|�������|���dS)Nc��
K�dSrrrrr�funcz(CoroutineTest.test_func_11.<locals>.func��
�����rr�__iter__�coroutine_wrapper)�assertIn�dirrr�r�)rr�r)s   r�test_func_11zCoroutineTest.test_func_11�s�������t�v�v��	
�
�
�k�3�t�9�9�-�-�-��
�
�j�#�d�n�n�&6�&6�"7�"7�8�8�8��
�
�)�4����0@�0@�+A�+A�B�B�B��
�
�����rc����fd�}|���|�td��5��d��ddd��dS#1swxYwYdS)Nc��P�K���d��}t�d{V��dSr)r&rX)r3�mes �r�gz%CoroutineTest.test_func_12.<locals>.g�s+���������
�
�A��I�I�I�I�I�I�I�I�Irzcoroutine already executing)r��
ValueErrorr&)rr�r�s  @r�test_func_12zCoroutineTest.test_func_12�s����	�	�	�	�	��Q�S�S��
�
#�
#�J�$A�C�C�	�	��G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A�A�Ac���d�}|��}|�td��5|�d��ddd��n#1swxYwY|���dS)Nc��
K�dSrrrrrr�z%CoroutineTest.test_func_13.<locals>.g�r�rz5can't send non-None value to a just-started coroutiner�)r�r�r&r�)rr�r)s   r�test_func_13zCoroutineTest.test_func_13�s���	�	�	��q�s�s��
�
#�
#��G�I�I�	�	�
�I�I�f����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
�
�
�����s�A�A�Ac�
��tjd�����fd�}|��}|�d��|�td��5|���ddd��dS#1swxYwYdS)Nc3�K�dV�dSrrrrrrgz'CoroutineTest.test_func_14.<locals>.gen�������E�E�E�E�Erc��p�K�	����d{V��dS#t$r����d{V��YdSwxYwr��
GeneratorExitr�s�rr)z(CoroutineTest.test_func_14.<locals>.coro�s_�����
��c�e�e����������� �
�
�
��c�e�e�����������
���s��5�5zcoroutine ignored GeneratorExit)rsr�r&r�r�r�)rr)�crgs   @r�test_func_14zCoroutineTest.test_func_14�s����	��	�	�
��	�	�	�	�	�	�

�D�F�F��	���t����
�
#�
#�L�$E�G�G�	�	�
�G�G�I�I�I�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A8�8A<�?A<c�l�d�}d�}|��}|�td��5||���d��ddd��n#1swxYwY|�td��5||���d��ddd��dS#1swxYwYdS)Nc��
K�dSr�rrrr�spammerz+CoroutineTest.test_func_15.<locals>.spammer�r�rc��K�|�d{V��Srrr�s r�readerz*CoroutineTest.test_func_15.<locals>.reader�s�����:�:�:�:�:�:�rr��&cannot reuse already awaited coroutine)r�r'r&r�)rr�r��spammer_coros    r�test_func_15zCoroutineTest.test_func_15�sW��	�	�	�	�	�	��w�y�y��
�
#�
#�M�6�
:�
:�	,�	,��F�<� � �%�%�d�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,��
#�
#�L�$L�N�N�	,�	,��F�<� � �%�%�d�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�	,�	,s#�A�A�A�=B)�)B-�0B-c����tjd�����fd�}�fd�}|��}||��}|�d��|�d��|�td��5|�t	d����ddd��n#1swxYwY||��}|�d��|�td��5|�d��ddd��n#1swxYwY|�td��5|�t	d����ddd��dS#1swxYwYdS)Nc3�K�dV�dSrrrrr�nopz'CoroutineTest.test_func_16.<locals>.nop
r�rc��,�K�����d{V��dSr�r�r�s�rr&z(CoroutineTest.test_func_16.<locals>.sends#������#�%�%�K�K�K�K�K�K�K��6rc��8�K�����d{V��|�d{V��Srr)r)r�s �r�readz(CoroutineTest.test_func_16.<locals>.reads0������#�%�%�K�K�K�K�K�K�K��:�:�:�:�:�:�r�hamr��wat)rsr�r&r��	Exceptionr�r�)rr&r�r�r�r�s     @r�test_func_16zCoroutineTest.test_func_16
sW���
��	�	�
��	�	�	�	�	�	�	�	�	�	�	��$�&�&����g�������D�������D����
�
#�
#�I�u�
5�
5�	+�	+��L�L��5�)�)�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+���g�������D����
�
#�
#�L�$L�N�N�	�	��K�K�����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	+�	+��L�L��5�)�)�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�	+�	+s6�;#B*�*B.�1B.�0D�D�D�8#E(�(E,�/E,c�:�d�}|��}|�td��5|�d��ddd��n#1swxYwY|�td��5|�d��ddd��n#1swxYwY|�td��5|�td����ddd��n#1swxYwY|���|���dS)Nc��
K�dSr�rrrrr�z-CoroutineTest.test_func_17.<locals>.coroutine,r�rr�r�r�)r�r'r&r�r�r�r�)rr�r)s   r�test_func_17zCoroutineTest.test_func_17)s���	�	�	��y�{�{��
�
#�
#�M�6�
:�
:�	�	��I�I�d�O�O�O�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	�	��I�I�d�O�O�O�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	)�	)��J�J�y��'�'�(�(�(�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	
�
�
�����
�
�����s5�A�A�A�1B�B�B�9#C(�(C,�/C,c��d�}|��}|���}t|��}|�td��5|�d��ddd��n#1swxYwY|�t
d��5|�d��ddd��n#1swxYwY|�t
d��5t
|��ddd��n#1swxYwY|�t
d��5|�td����ddd��n#1swxYwY|�t
d��5|�td����ddd��n#1swxYwY|�	��|�	��dS)Nc��
K�dSr�rrrrr�z-CoroutineTest.test_func_18.<locals>.coroutineCr�rr�r�r�)
rr�r�r'r&r�r1r�r�r�)rr�r)�
await_iter�its     r�test_func_18zCoroutineTest.test_func_18@s���	�	�	��y�{�{���^�^�%�%�
�
�*�
�
��
�
#�
#�M�6�
:�
:�	�	��G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	�	��G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	�	�
��H�H�H�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
#�
#�L�$L�N�N�	'�	'��H�H�Y�u�%�%�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��
#�
#�L�$L�N�N�	'�	'��H�H�Y�u�%�%�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�	���
�
�
�
���
�
�
�
�
sZ�A.�.A2�5A2�B6�6B:�=B:�C8�8C<�?C<�#E
�
E�E�3#F"�"F&�)F&c����d�tj�fd�����fd�}|��}|�d��|�d��|��d��|���|��d��td��D],}|���|��d���-dS)Nrc3�J�K�dV�	dV�dS#t$r	�dz
�YdSwxYwr�r�)�CHKs�rrXz'CoroutineTest.test_func_19.<locals>.fooksN�����
�E�E�E�
�������� �
�
�
��q������
���s��"�"c��,�K�����d{V��dSrr)rXs�rr�z-CoroutineTest.test_func_19.<locals>.coroutinetr�rr0�)rsr�r&r\r�rY)rr�r)r�rrXs    @@r�test_func_19zCoroutineTest.test_func_19hs�������	��	�	�	�	�
��	�	�	�	�	�	��y�{�{���	�	�$�����	�	�$��������a� � � ��
�
��������a� � � ��q���	%�	%�A�
�J�J�L�L�L����S�!�$�$�$�$�		%�	%rc�j�d�}t|����}|�|gdf��dS)Nc��
K�dS)N�rnrrrrrXz7CoroutineTest.test_coro_wrapper_send_tuple.<locals>.foo�s�����5rr
)r4r\�rrXr+s   r�test_coro_wrapper_send_tuplez*CoroutineTest.test_coro_wrapper_send_tuple�sF��	�	�	�$�C�C�E�E�*�*������"�e��-�-�-�-�-rc��d�}t|����}|�|dt��|�|djd��dS)Nc��$K�td��Srmr�rrrrXz?CoroutineTest.test_coro_wrapper_send_stop_iterator.<locals>.foo�s���� ��$�$�$rr0rn)r4rrr'r\rrs   r�$test_coro_wrapper_send_stop_iteratorz2CoroutineTest.test_coro_wrapper_send_stop_iterator�sb��	%�	%�	%�$�C�C�E�E�*�*�����f�Q�i��7�7�7��������"�-�-�-�-�-rc�
�����tj��fd�����fd�����fd�}|�����tj���tj�����j����d����tj���tj	�����jjj
jd����t��5��d��ddd��n#1swxYwY��tj���tj�����j��dS)Nc3�D�K���tj���tj�����j��dV���tj���tj�����j��dSr)r\r^�getcoroutinestate�CORO_RUNNING�assertIsNone�cr_await)�coro_brs��rr�z&CoroutineTest.test_cr_await.<locals>.a�s���������W�6�v�>�>��@T�U�U�U����f�o�.�.�.��E�E�E����W�6�v�>�>��@T�U�U�U����f�o�.�.�.�.�.rc��,�K�����d{V��dSrr)r�s�rr�z&CoroutineTest.test_cr_await.<locals>.c�s"������!�#�#�I�I�I�I�I�I�I�I�Irc���K����j������d{V�����j��dSr)rr)r�rrs���r�bz&CoroutineTest.test_cr_await.<locals>.b�sP��������f�o�.�.�.��!�#�#�I�I�I�I�I�I�I����f�o�.�.�.�.�.rr�)rsr�r\r^r�CORO_CREATEDrrr&�CORO_SUSPENDED�gi_code�co_namerEr'�CORO_CLOSED)rrr�r�rs` @@@r�
test_cr_awaitzCoroutineTest.test_cr_await�s�������	��	/�	/�	/�	/�	/�
��	/�	�	�	�	�	�	/�	/�	/�	/�	/�	/�	/�
���������2�6�:�:�G�<P�Q�Q�Q����&�/�*�*�*����D��������2�6�:�:�G�<R�S�S�S������1�9�A�3�G�G�G�
�
�
�}�
-�
-�	�	��K�K�����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����2�6�:�:�G�<O�P�P�P����&�/�*�*�*�*�*s�
D,�,D0�3D0c�4�tj}|�d|jj��|�d|jj��|�d|jj��|�d|jdj��|�d|jdj��|�|j	d��d�}|��}|�d	t|����|���dS)
Nzinto coroutinezinside coroutinezin coroutinezof the coroutinerrr�c��
K�dSrrrrrr|z(CoroutineTest.test_corotype_1.<locals>.f�r�rzcoroutine object)rsrtr�r&�__doc__r�r��__dict__r\rr�)r�ctr|r�s    r�test_corotype_1zCoroutineTest.test_corotype_1�s���
�
 ���
�
�&����8�8�8��
�
�(�"�(�*:�;�;�;��
�
�n�b�h�&6�7�7�7��
�
�(�"�+�j�*A�*I�J�J�J��
�
�(�"�+�n�*E�*M�N�N�N������k�2�2�2����
�A�C�C���
�
�(�$�q�'�'�2�2�2�	���	�	�	�	�	rc��d�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��K�d�d{V��dSr�rrrrrXz'CoroutineTest.test_await_1.<locals>.foo�s�����G�G�G�G�G�G�G�G�Grzobject int can.t.*await�r�r�r-r�s  r�test_await_1zCoroutineTest.test_await_1�s���	�	�	�
�
#�
#�I�/H�
I�
I�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	r�c��d�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��K�g�d{V��dSrrrrrrXz'CoroutineTest.test_await_2.<locals>.foo�s�����H�H�H�H�H�H�H�H�Hrzobject list can.t.*awaitr+r�s  r�test_await_2zCoroutineTest.test_await_2�s���	�	�	�
�
#�
#�I�/I�
J�
J�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	r�c���d�}|�t|����gd�df��|�t|����gd�df��dS)Nc��8K�tgd����d{V��dS)N�r0r/r	)r	rrrrXz'CoroutineTest.test_await_3.<locals>.foo�s0���� ����+�+�+�+�+�+�+�+�+�+�+rr2)r\r-r4r�s  r�test_await_3zCoroutineTest.test_await_3�st��	,�	,�	,�	
����3�3�5�5�)�)�I�I�I�t�+<�=�=�=����+�C�C�E�E�2�2�Y�Y�Y��4E�F�F�F�F�Frc�r��d���fd�}|�t|����gdf��dS)Nc��
K�dS�N�*rrrrrqz'CoroutineTest.test_await_4.<locals>.bar�rorc��(�K�����d{V��Srrr�s�rrXz'CoroutineTest.test_await_4.<locals>.foo�s���������;�;�;�;�;�;�rr7�r\r-)rrXrqs  @r�test_await_4zCoroutineTest.test_await_4�s[���	�	�	�	�	�	�	�	�	
����3�3�5�5�)�)�B��8�4�4�4�4�4rc����Gd�d����fd�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��eZdZd�ZdS)�-CoroutineTest.test_await_5.<locals>.Awaitablec��dSrrrs rrz7CoroutineTest.test_await_5.<locals>.Awaitable.__await__�s���rN�rrrrrrr�	Awaitabler=�s#������
�
�
�
�
rr@c��(�K�����d{V��Srr�r@s�rrXz'CoroutineTest.test_await_5.<locals>.foo��%�����#�)�+�+�%�%�%�%�%�%�&r�(__await__.*returned non-iterator of typer+�rrXr@s  @r�test_await_5zCoroutineTest.test_await_5�s����	�	�	�	�	�	�	�	�	'�	'�	'�	'�	'��
#�
#��A�C�C�	�	�
�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	��A�A�Ac���Gd�d����fd�}|�t|����dgdf��dS)Nc��eZdZd�ZdS)�-CoroutineTest.test_await_6.<locals>.Awaitablec�"�tdg��S)N�4�r�rs rrz7CoroutineTest.test_await_6.<locals>.Awaitable.__await__�s���R�D�z�z�!rNr?rrrr@rJ�s#������
"�
"�
"�
"�
"rr@c��(�K�����d{V��SrrrBs�rrXz'CoroutineTest.test_await_6.<locals>.foo�rCrrLr9rEs  @r�test_await_6zCoroutineTest.test_await_6�sv���	"�	"�	"�	"�	"�	"�	"�	"�	'�	'�	'�	'�	'�	
����3�3�5�5�)�)�R�D�$�<�8�8�8�8�8rc���Gd�d����fd�}|�t|����dgdf��dS)Nc��eZdZd�ZdS)�-CoroutineTest.test_await_7.<locals>.Awaitablec3�K�dV�dS)Nr7r�rrs rrz7CoroutineTest.test_await_7.<locals>.Awaitable.__await__�s���������srNr?rrrr@rR�s#������
�
�
�
�
rr@c��(�K�����d{V��SrrrBs�rrXz'CoroutineTest.test_await_7.<locals>.foo�rCrr7r�r9rEs  @r�test_await_7zCoroutineTest.test_await_7�sv���	�	�	�	�	�	�	�	�
	'�	'�	'�	'�	'�	
����3�3�5�5�)�)�R�D�#�;�7�7�7�7�7rc����Gd�d����fd�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��eZdZdS)�-CoroutineTest.test_await_8.<locals>.AwaitableN�rrrrrrr@rX��������Drr@c��(�K�����d{V��SrrrBs�rrXz'CoroutineTest.test_await_8.<locals>.foos$�����i�i�k�k� 1� 1� 1� 1� 1� 1�1rz4object Awaitable can't be used in 'await' expressionr+rEs  @r�test_await_8zCoroutineTest.test_await_8s����	�	�	�	�	�	�	�	�	2�1�1�1�1�
�
#�
#��M�O�O�	�	�
�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	rGc������fd��d����fd�}�fd�}|�t|����gdf��|�t|����gdf��dS)Nc����Srrr�s�r�wrapz(CoroutineTest.test_await_9.<locals>.wraps����Jrc��
K�dSr6rrrrrqz'CoroutineTest.test_await_9.<locals>.barrorc��B�K�d�fd�i}G�fd�d��}����d{V��������d{V��z|d�������d{V��z����d{V��dzz|������d{V��zS)Nrc����Srr�r_s�rr�z9CoroutineTest.test_await_9.<locals>.foo.<locals>.<lambda>s����rc���eZdZ�ZdS)�3CoroutineTest.test_await_9.<locals>.foo.<locals>.DBN)rrrrrcs�r�DBres����������rrf���r)�dbrfrqr_s  ��rrXz'CoroutineTest.test_await_9.<locals>.foos�����������%�B�
�
�
�
�
�
�
�
�
�
��#�%�%�K�K�K�K�K�K��������.�.�.�.�.�.�0�����C��������3F�3F�3F�3F�3F�3F�F��#�%�%�K�K�K�K�K�K�$�&�'�/5�r�t�t�v�v�x�x�������8�
9rc��*�K�����d{V��Srrr�s�r�foo2z(CoroutineTest.test_await_9.<locals>.foo2s!������#�%�%�K�K�K�K�K�K�<�ri��i���r9)rrXrkrqr_s   @@r�test_await_9zCoroutineTest.test_await_9s�����	�	�	�	�	�	�	�	�	9�	9�	9�	9�	9�	9�	 �	 �	 �	 �	 �	
����3�3�5�5�)�)�B��;�7�7�7�����4�4�6�6�*�*�R��I�6�6�6�6�6rc�~���d���fd���fd�}|�t|����gdf��dS)Nc��
K�dSr6rrrr�bazz(CoroutineTest.test_await_10.<locals>.baz"rorc���K����Srr)ros�rrqz(CoroutineTest.test_await_10.<locals>.bar%s������3�5�5�Lrc��4�K�����d{V���d{V��Srrr�s�rrXz(CoroutineTest.test_await_10.<locals>.foo(s1����� #����+�+�+�+�+�+�&�&�&�&�&�&�&rr7r9)rrXrqros  @@r�
test_await_10zCoroutineTest.test_await_10!su����	�	�	�	�	�	�	�	�	'�	'�	'�	'�	'�	
����3�3�5�5�)�)�B��8�4�4�4�4�4rc����d��d����fd�}�fd�}|�t|����gdf��dS)Nc��|Srr��vals r�identz*CoroutineTest.test_await_11.<locals>.ident.s���Jrc��
K�dSr�rrrrrqz(CoroutineTest.test_await_11.<locals>.bar1r�rc��<�K������d{V�����S)Nrur)rqrws��rrXz(CoroutineTest.test_await_11.<locals>.foo4s,������5�3�3�5�5�[�[�[�[�[�[�)�)�)�)rc��,�K�����d{V��dfS)Nr�rr�s�rrkz)CoroutineTest.test_await_11.<locals>.foo27s$���������;�;�;�;�;�;��%�%r)r�r�r9)rrXrkrqrws   @@r�
test_await_11zCoroutineTest.test_await_11-s�����	�	�	�	�	�	�	*�	*�	*�	*�	*�	*�	&�	&�	&�	&�	&�	
����4�4�6�6�*�*�R��,A�B�B�B�B�Brc����d�}|���G�fd�d����fd�}|�td��5t|����ddd��n#1swxYwY����dS)Nc��
K�dSr�rrrrr)z)CoroutineTest.test_await_12.<locals>.coro=r�rc���eZdZ�fd�ZdS)�.CoroutineTest.test_await_12.<locals>.Awaitablec����Srr)rr�s �rrz8CoroutineTest.test_await_12.<locals>.Awaitable.__await__Bs����rNr?�r�s�rr@rAs.�������
�
�
�
�
�
�
rr@c��(�K�����d{V��SrrrBs�rrXz(CoroutineTest.test_await_12.<locals>.fooE�%�����"����$�$�$�$�$�$�$rz"__await__\(\) returned a coroutine)r�r�r-r�)rr)rXr@r�s   @@r�
test_await_12zCoroutineTest.test_await_12<s����	�	�	��D�F�F��	�	�	�	�	�	�	�	�	�	�	%�	%�	%�	%�	%��
#�
#��@�B�B�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
���	�	�	�	�	s�A#�#A'�*A'c����Gd�d����fd�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��eZdZd�ZdS)�.CoroutineTest.test_await_13.<locals>.Awaitablec��|Srrrs rrz8CoroutineTest.test_await_13.<locals>.Awaitable.__await__P����rNr?rrrr@r�O�#������
�
�
�
�
rr@c��(�K�����d{V��SrrrBs�rrXz(CoroutineTest.test_await_13.<locals>.fooSr�rrDr+rEs  @r�
test_await_13zCoroutineTest.test_await_13Ns����	�	�	�	�	�	�	�	�	%�	%�	%�	%�	%��
#�
#��A�C�C�	�	�
�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	rGc������Gd�d���Gd�d���Gd�dt�����fd����fd�}|��}|�d��|�td	��5|�d	��ddd��n#1swxYwY|��}|�d��|����5|�t��ddd��dS#1swxYwYdS)
Nc��eZdZd�Zd�ZdS)�,CoroutineTest.test_await_14.<locals>.Wrapperc��||_dSrr�)rr)s  rrz5CoroutineTest.test_await_14.<locals>.Wrapper.__init__^s
�� ��	�	�	rc�4�|j���Sr)r)rrs rrz6CoroutineTest.test_await_14.<locals>.Wrapper.__await__as���y�*�*�,�,�,rNrrrr�Wrapperr�\s2������
!�
!�
!�
-�
-�
-�
-�
-rr�c��eZdZd�ZdS)�/CoroutineTest.test_await_14.<locals>.FutureLikec3�K�dV�Srrrs rrz9CoroutineTest.test_await_14.<locals>.FutureLike.__await__es�������rNr?rrr�
FutureLiker�ds#������
�
�
�
�
rr�c��eZdZdS)�+CoroutineTest.test_await_14.<locals>.MarkerNrYrrr�Markerr�hrZrr�c��J�K�	����d{V��S#t$r��wxYwrr�)r�r�s��r�coro1z*CoroutineTest.test_await_14.<locals>.coro1ksJ�����
�'�Z�\�\�)�)�)�)�)�)�)��$�
�
�
���
���s��
"c��:�K��������d{V��Srr)r�r�s��r�coro2z*CoroutineTest.test_await_14.<locals>.coro2ps/����� ������)�)�)�)�)�)�)�)�)rr�)r�r&r�r'rEr�r�)rr�r�r�r�r�r�s   @@@@r�
test_await_14zCoroutineTest.test_await_14[s�������	-�	-�	-�	-�	-�	-�	-�	-�	�	�	�	�	�	�	�	�	�	�	�	�	�Y�	�	�	�	�	�	�	�	�	�
	*�	*�	*�	*�	*�	*�
�E�G�G��	���t����
�
#�
#�M�6�
:�
:�	�	�
�F�F�6�N�N�N�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�E�G�G��	���t����
�
�
�v�
&�
&�	'�	'�
�G�G�%�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�	'�	's$�8B�B�!B�D�D�Dc�$��tjd�����fd�}d�}|��}|�d��|�td��5||���d��ddd��dS#1swxYwYdS)Nc3�K�dV�dSrrrrrr�z(CoroutineTest.test_await_15.<locals>.nop~r�rc��,�K�����d{V��dSrrr�s�rr�z.CoroutineTest.test_await_15.<locals>.coroutine�r�rc��K�|�d{V��dSrrr�s r�waiterz+CoroutineTest.test_await_15.<locals>.waiter�s�����J�J�J�J�J�J�J�J�Jrz"coroutine is being awaited already)rsr�r&r�r�)rr�r�r)r�s    @r�
test_await_15zCoroutineTest.test_await_15}s����	��	�	�
��	�	�	�	�	�	�	�	�	��y�{�{���	�	�$����
�
#�
#�L�$H�J�J�	$�	$��F�4�L�L���d�#�#�#�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$s�B�B	�B	c���d���fd�}t|����\}}|�|j��dS)Nc��"K�t��Sr)r�rrrr|z&CoroutineTest.test_await_16.<locals>.f�s�����<�<�rc��F�K�	t�#����d{V��cYSxYwr)�KeyError�r|s�rr�z&CoroutineTest.test_await_16.<locals>.g�s8�����
!����
!��Q�S�S�y�y�y�y�y�y� � � ���s�� )r-r�__context__)rr�r�r+r|s    @r�
test_await_16zCoroutineTest.test_await_16�s_���	 �	 �	 �	!�	!�	!�	!�	!��a�a�c�c�N�N�	��6����&�,�-�-�-�-�-rc�2��Gd�d����fd�}|��}t|��\}}|�|gd����fd�}|�t��5t|����ddd��dS#1swxYwYdS)Nc� �eZdZd�Zd�Zd�ZdS)�*CoroutineTest.test_with_1.<locals>.Managerc��||_dSr)�name)rr�s  rrz3CoroutineTest.test_with_1.<locals>.Manager.__init__�s
�� ��	�	�	rc��XK�td|jzd|jzg���d{V��|S)Nzenter-1-zenter-2-�r	r�rs r�
__aenter__z5CoroutineTest.test_with_1.<locals>.Manager.__aenter__�sS����$�j�4�9�&<�&0�4�9�&<�&>�?�?�?�?�?�?�?�?�?��rc��rK�td|jzd|jzg���d{V��|jdkrdSdS)Nzexit-1-zexit-2-�BTr�)rr(s  r�	__aexit__z4CoroutineTest.test_with_1.<locals>.Manager.__aexit__�sn����$�i�$�)�&;�&/�$�)�&;�&=�>�>�>�>�>�>�>�>�>��9��#� ��4� � rN)rrrrr�r�rrr�Managerr��sA������
!�
!�
!�
�
�
�

 �
 �
 �
 �
 rr�c��2�K��d��4�d{V��}�d��4�d{V��}td|j|jfg���d{V��ddzddd���d{V��n#1�d{V��swxYwYddd���d{V��dS#1�d{V��swxYwYdS)N�Ar��managersr0rr�)r�rr�s  �rrXz&CoroutineTest.test_with_1.<locals>.foo��������w�s�|�|�
�
�
�
�
�
�
�q�'�'�#�,�,�
�
�
�
�
�
�
�!�$�z�1�6�1�6�&B�%C�D�D�D�D�D�D�D�D�D��!���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
�4�B�)A"�B�"
A,	�,B�/A,	�0B�
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��2�K��d��4�d{V��}�d��4�d{V��}td|j|jfg���d{V��ddzddd���d{V��n#1�d{V��swxYwYddd���d{V��dS#1�d{V��swxYwYdS)Nr��Cr�r0rr�)r�r�r�s  �rrXz&CoroutineTest.test_with_1.<locals>.foo�r�r�)r-r\rEr�)rrXr|r+r�r�s     @r�test_with_1zCoroutineTest.test_with_1�s5���	 �	 �	 �	 �	 �	 �	 �	 �"	�	�	�	�	�

�C�E�E���a�L�L�	�������E�E�E�	
�	
�	
�	�	�	�	�	�
�
�
�0�
1�
1�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�'B�B�Bc�����Gd�d���d���fd�}|�td��5t|����ddd��n#1swxYwY|��d��dS)Nc��eZdZd�ZdS)�%CoroutineTest.test_with_2.<locals>.CMc��dSrrrs rr�z0CoroutineTest.test_with_2.<locals>.CM.__aenter__�����rN)rrrr�rrr�CMr���#������
�
�
�
�
rr�c��~�K�d����4�d{V��d�ddd���d{V��dS#1�d{V��swxYwYdS�NFTr�r��
body_executeds��rrXz&CoroutineTest.test_with_2.<locals>.foo��������!�M��r�t�t�
%�
%�
%�
%�
%�
%�
%�
%� $�
�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%����
%�
%�
%�
%�
%�
%��,�
6�6z'asynchronous context manager.*__aexit__F�r�r�r-r��rrXr�r�s  @@r�test_with_2zCoroutineTest.test_with_2�s�����	�	�	�	�	�	�	�	��
�	%�	%�	%�	%�	%�	%��
#�
#�I�/X�
Y�
Y�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�m�U�+�+�+�+�+��A�A�Ac�����Gd�d���d���fd�}|�td��5t|����ddd��n#1swxYwY|��d��dS)Nc��eZdZd�ZdS)�%CoroutineTest.test_with_3.<locals>.CMc��dSrrrs rr�z/CoroutineTest.test_with_3.<locals>.CM.__aexit__�r�rN)rrrr�rrrr�r��r�rr�c��~�K�d����4�d{V��d�ddd���d{V��dS#1�d{V��swxYwYdSr�rr�s��rrXz&CoroutineTest.test_with_3.<locals>.foo�r�r��asynchronous context managerFr�r�s  @@r�test_with_3zCoroutineTest.test_with_3�s�����	�	�	�	�	�	�	�	��
�	%�	%�	%�	%�	%�	%��
#�
#�I�/M�
N�
N�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�m�U�+�+�+�+�+r�c�����Gd�d���d���fd�}|�td��5t|����ddd��n#1swxYwY|��d��dS)Nc��eZdZdS)�%CoroutineTest.test_with_4.<locals>.CMNrYrrrr�r��rZrr�c��~�K�d����4�d{V��d�ddd���d{V��dS#1�d{V��swxYwYdSr�rr�s��rrXz&CoroutineTest.test_with_4.<locals>.foo�r�r�r�Fr�r�s  @@r�test_with_4zCoroutineTest.test_with_4�s�����	�	�	�	�	�	�	�	��
�	%�	%�	%�	%�	%�	%��
#�
#�I�/M�
N�
N�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��
�
�m�U�+�+�+�+�+r�c���Gd�d����fd�}|�t��5t|����ddd��dS#1swxYwYdS)Nc��eZdZd�Zd�ZdS)�%CoroutineTest.test_with_5.<locals>.CMc��
K�|Srrrs rr�z0CoroutineTest.test_with_5.<locals>.CM.__aenter__�������rc��
K�dSrr)r�excs  rr�z/CoroutineTest.test_with_5.<locals>.CM.__aexit__�������rN�rrrr�r�rrrr�r��s2������
�
�
�
�
�
�
�
rr�c��x�K����4�d{V��	ddd���d{V��dS#1�d{V��swxYwYdSrr�r�s�rr�z'CoroutineTest.test_with_5.<locals>.funcs�������r�t�t�
"�
"�
"�
"�
"�
"�
"�
"�!�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"����
"�
"�
"�
"�
"�
"��)�
3�3)rE�AssertionErrorr-)rr�r�s  @r�test_with_5zCoroutineTest.test_with_5�s����
	�	�	�	�	�	�	�	�	"�	"�	"�	"�	"��
�
�~�
.�
.�	�	��d�d�f�f����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A�A�Ac����Gd�d����fd�}|�td��5t|����ddd��dS#1swxYwYdS)Nc��eZdZd�Zd�ZdS)�%CoroutineTest.test_with_6.<locals>.CMc��dS)N�{rrs rr�z0CoroutineTest.test_with_6.<locals>.CM.__aenter__
����src��dS�Ni�r�r�es  rr�z/CoroutineTest.test_with_6.<locals>.CM.__aexit__
r�rNr�rrrr�r�	s2������
�
�
�
�
�
�
�
rr�c��x�K����4�d{V��	ddd���d{V��dS#1�d{V��swxYwYdSrrr�s�rrXz&CoroutineTest.test_with_6.<locals>.foos�������r�t�t�
�
�
�
�
�
�
�
��
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
r�zV'async with' received an object from __aenter__ that does not implement __await__: intr+)rrXr�s  @r�test_with_6zCoroutineTest.test_with_6s����	�	�	�	�	�	�	�	�	�	�	�	�	��
#�
#��9�:�:�	�	�

�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	rGc���Gd�d����fd�}	t|����|�d��dS#t$ru}|�|jdd��|�|jdu��|�t|jt����Yd}~dSd}~wwxYw)Nc��eZdZd�Zd�ZdS)�%CoroutineTest.test_with_7.<locals>.CMc��
K�|Srrrs rr�z0CoroutineTest.test_with_7.<locals>.CM.__aenter__r�rc��dS)Ni�rr�s  rr�z/CoroutineTest.test_with_7.<locals>.CM.__aexit__ r�rNr�rrrr�r��2������
�
�
�
�
�
�
�
rr�c���K����4�d{V��ddzddd���d{V��dS#1�d{V��swxYwYdS�Nr0rrr�s�rrXz&CoroutineTest.test_with_7.<locals>.foo$s�������r�t�t�
�
�
�
�
�
�
�
��!���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
��-�
7�7z1invalid 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�)rrXr�r�s   @r�test_with_7zCoroutineTest.test_with_7s���	�	�	�	�	�	�	�	�	�	�	�	�	�
	K��c�c�e�e����
�I�I�I�J�J�J�J�J���	L�	L�	L��������9�
:�
:�
:�
�O�O�C�O�4�7�8�8�8��O�O�J�s��8I�J�J�K�K�K�K�K�K�K�K�K�����
	L���s�A�
C�
A*B=�=Cc�X���d�Gd�d�����fd�}|�td��5t|����ddd��n#1swxYwY|��d����fd�}|�td��5t|����ddd��n#1swxYwY|��d����fd	�}|�td��5t|����ddd��n#1swxYwY|��d
����fd�}|�td��5t|����ddd��n#1swxYwY|��d��dS)
Nrc��eZdZd�Zd�ZdS)�%CoroutineTest.test_with_8.<locals>.CMc��
K�|Srrrs rr�z0CoroutineTest.test_with_8.<locals>.CM.__aenter__9r�rc��dSr�rr�s  rr�z/CoroutineTest.test_with_8.<locals>.CM.__aexit__<r�rNr�rrrr�r8r�rr�c���K����4�d{V���dz
�ddd���d{V��dS#1�d{V��swxYwYdSr�r�r��CNTs��rrXz&CoroutineTest.test_with_8.<locals>.foo@��������r�t�t�
�
�
�
�
�
�
�
��q���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
r�rr0c���K�td��D]>}���4�d{V���dz
�	ddd���d{V��dS#1�d{V��swxYwY�?dS�Nr/r0�rY�r3r�rs ��rrXz&CoroutineTest.test_with_8.<locals>.fooLs�������1�X�X�
�
���2�4�4����������1�H�C�����������������������������������
�
s�A�
A
	�
A
	r/c���K�td��D]<}���4�d{V���dz
�	ddd���d{V���+#1�d{V��swxYwY�=dSrrrs ��rrXz&CoroutineTest.test_with_8.<locals>.fooZs�������1�X�X�
�
���2�4�4����������1�H�C���������������������������������
�
s�>�
A	�A	r	c���K����4�d{V���dz
�	ddd���d{V��dS#1�d{V��swxYwYdSr�rr
s��rrXz&CoroutineTest.test_with_8.<locals>.foohs�������r�t�t�
�
�
�
�
�
�
�
��q����
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
s�.�
8�8�)r�r�r-r\�rrXr�rs  @@r�test_with_8zCoroutineTest.test_with_85s;������	�	�	�	�	�	�	�	�	�	�	�	�	�	��
#�
#��9�:�:�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
����a� � � �	�	�	�	�	�	��
#�
#��9�:�:�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
����a� � � �	�	�	�	�	�	��
#�
#��9�:�:�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
����a� � � �	�	�	�	�	�	�
�
#�
#��9�:�:�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
����a� � � � � sG�A�A�A�B=�=C�C�?D#�#D'�*D'�%F	�	F
�F
c�����d�Gd�d�����fd�}|�t��5t|����ddd��n#1swxYwY|��d��dS)Nrc��eZdZd�Zd�ZdS)�%CoroutineTest.test_with_9.<locals>.CMc��
K�|Srrrs rr�z0CoroutineTest.test_with_9.<locals>.CM.__aenter__yr�rc��K�ddzdSr�rr�s  rr�z/CoroutineTest.test_with_9.<locals>.CM.__aexit__|������!����rNr�rrrr�rx�2������
�
�
�
�
�
�
�
rr�c���K����4�d{V���dz
�ddd���d{V��dS#1�d{V��swxYwYdSr�rr
s��rrXz&CoroutineTest.test_with_9.<locals>.foorr�r0�rEr�r-r\rs  @@r�test_with_9zCoroutineTest.test_with_9us�������	�	�	�	�	�	�	�	�	�	�	�	�	�	�
�
�
�0�
1�
1�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
����a� � � � � ��A�A�Ac����d�Gd�d�����fd�}	t|����|�d��dS#t$r�}|�|jdu��|�t|jt����|�t|jjt����Yd}~dSd}~wwxYw)Nrc��eZdZd�Zd�ZdS)�&CoroutineTest.test_with_10.<locals>.CMc��
K�|Srrrs rr�z1CoroutineTest.test_with_10.<locals>.CM.__aenter__�r�rc��K�ddzdSr�rr�s  rr�z0CoroutineTest.test_with_10.<locals>.CM.__aexit__�rrNr�rrrr�r#�rrr�c����K����4�d{V�����4�d{V��t�#1�d{V��swxYwY	ddd���d{V��dS#1�d{V��swxYwYdSr�r�r
s��rrXz'CoroutineTest.test_with_10.<locals>.foo�sV������r�t�t�
'�
'�
'�
'�
'�
'�
'�
'��2�4�4�'�'�'�'�'�'�'�'�&�&�'�'�'�'�'�'�'�'�'�'����'�'�'�'�'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�
'�
's'�A�-�
7	�A�7	�A�
A�Az*exception from __aexit__ did not propagate)r-rr�r]r�rr��rrXr�r�rs   @@r�test_with_10zCoroutineTest.test_with_10�s'������	�	�	�	�	�	�	�	�	'�	'�	'�	'�	'�	'�	D��c�c�e�e����
�I�I�B�C�C�C�C�C��
!�	6�	6�	6��O�O�C�O�4�7�8�8�8��O�O�J�s��8I�J�J�K�K�K��O�O�J�s��'B�'3�5�5�
6�
6�
6�
6�
6�
6�
6�
6�
6�����	6���s�A�
C�A;C�Cc����d�Gd�d�����fd�}	t|����|�d��dS#t$r'}|�|jdu��Yd}~dSd}~wwxYw)Nrc��eZdZd�Zd�ZdS)�&CoroutineTest.test_with_11.<locals>.CMc��K�t�r)�NotImplementedErrorrs rr�z1CoroutineTest.test_with_11.<locals>.CM.__aenter__�s����)�)rc��K�ddzdSr�rr�s  rr�z0CoroutineTest.test_with_11.<locals>.CM.__aexit__�rrNr�rrrr�r,�s2������
*�
*�
*�
�
�
�
�
rr�c��^�K����4�d{V��t�#1�d{V��swxYwYdSrr'r
s��rrXz'CoroutineTest.test_with_11.<locals>.foo�s�������r�t�t�
#�
#�
#�
#�
#�
#�
#�
#�"�"�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#����
#�
#�
#�
#�
#�
#s��
&�&z+exception from __aenter__ did not propagate)r-rr.r]r�r(s   @@r�test_with_11zCoroutineTest.test_with_11�s�������	�	�	�	�	�	�	�	�	#�	#�	#�	#�	#�	#�
	E��c�c�e�e����
�I�I�C�D�D�D�D�D��#�	5�	5�	5��O�O�C�O�t�3�4�4�4�4�4�4�4�4�4�����	5���s�A�
A8�A3�3A8c�f����d�Gd�d������fd�}t|����dS)Nrc��eZdZd�Zd�ZdS)�&CoroutineTest.test_with_12.<locals>.CMc��
K�|Srrrs rr�z1CoroutineTest.test_with_12.<locals>.CM.__aenter__�r�rc��
K�dS�NTrr�s  rr�z0CoroutineTest.test_with_12.<locals>.CM.__aexit__�������trNr�rrrr�r4�s2������
�
�
�
�
�
�
�
rr�c���K����4�d{V��}��|j���t�#1�d{V��swxYwYdSr)r��	__class__r�)�cmr�rrs ���rrXz'CoroutineTest.test_with_12.<locals>.foo�s�������r�t�t�
#�
#�
#�
#�
#�
#�
#�r��
�
�b�l�B�/�/�/�"�"�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#����
#�
#�
#�
#�
#�
#s�#7�
A�A)r-rs` @@r�test_with_12zCoroutineTest.test_with_12�sq�������	�	�	�	�	�	�	�	�	#�	#�	#�	#�	#�	#�	#�	�#�#�%�%�����rc�����d�Gd�d�����fd�}|�t��5t|����ddd��n#1swxYwY|��d��dS)Nrc��eZdZd�Zd�ZdS)�&CoroutineTest.test_with_13.<locals>.CMc��K�ddzdSr�rrs rr�z1CoroutineTest.test_with_13.<locals>.CM.__aenter__�rrc��
K�dSr7rr�s  rr�z0CoroutineTest.test_with_13.<locals>.CM.__aexit__�r8rNr�rrrr�r?�s2������
�
�
�
�
�
�
�
rr�c���K��dz
����4�d{V���dz
�ddd���d{V��n#1�d{V��swxYwY�dz
�dS)Nr0rg�'rr
s��rrXz'CoroutineTest.test_with_13.<locals>.foo�s�������1�H�C��r�t�t�
�
�
�
�
�
�
�
��t���
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��5�L�C�C�Cs�1�
;�;r0rrs  @@r�test_with_13zCoroutineTest.test_with_13�s�������	�	�	�	�	�	�	�	�	�	�	�	�	�	��
�
�0�
1�
1�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����a� � � � � r c�����d�G�fd�d���g���fd�}t|����\}}|��d��|�|d�tdd��D����|��d�tdd	��D����g���fd
�}t|����\}}|��d��|�|dd
g��|��d�tdd��D��dgz��g���fd�}t|����\}}|��d��|�|d�tdd��D����|��d�tdd��D��ddgz��dS)Nrc�&��eZdZd�Z�fd�Zd�ZdS)�+CoroutineTest.test_for_1.<locals>.AsyncIterc��d|_dS�NrrUrs 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_|jdzst|jdz���d{V��|jdkrt�|j|jfS)Nr0rnr�)r3r�StopAsyncIterationrs r�	__anext__z5CoroutineTest.test_for_1.<locals>.AsyncIter.__anext__�sk�������!��������2�$�T�V�b�[�1�1�1�1�1�1�1�1�1��6�C�<�-�,�,��v�t�v�~�%rN�rrrrrMrP)rLs�r�	AsyncIterrG�sL�������
�
�
�
�
�
�
�
�
	
&�	
&�	
&�	
&�	
&rrRc��h�K����23d{V��\}}��||z���#6dSr�r%)�i1�i2rRr*s  ��r�test1z'CoroutineTest.test_for_1.<locals>.test1�s[����� )�	���
'�
'�
'�
'�
'�
'�
'�f�b�"��
�
�b�2�g�&�&�&�&�!,��s�1r0c��g|]}|dz��S�r�rr�s  rr�z,CoroutineTest.test_for_1.<locals>.<listcomp>���"A�"A�"A�q�1�s�7�"A�"A�"Ar�c��g|]}|dz��S)r/rr�s  rr�z,CoroutineTest.test_for_1.<locals>.<listcomp>s��!=�!=�!=�!�!�A�#�!=�!=�!=r�ec����K����23d{V��}��|d��|ddkrn�16��d����d��dS�Nr��what?�endrT�r3rRr*s ��r�test2z'CoroutineTest.test_for_1.<locals>.test2s������$�9�;�;�
'�
'�
'�
'�
'�
'�
'�a��
�
�a��d�#�#�#��Q�4�2�:���E��'�
�
�
�g�&�&�&��M�M�%� � � � � s�?r/r���c��g|]}|��Srrr�s  rr�z,CoroutineTest.test_for_1.<locals>.<listcomp>���!:�!:�!:��!�!:�!:�!:r�rbc����K����23d{V��}|ddkr���|d���06��d����d��dSr_rTrcs ��r�test3z'CoroutineTest.test_for_1.<locals>.test3s������$�9�;�;�
'�
'�
'�
'�
'�
'�
'�a��Q�4�"�9����
�
�a��d�#�#�#�#�'�
�
�
�g�&�&�&��M�M�%� � � � � s�>r	c��g|]}|dz��SrYrr�s  rr�z,CoroutineTest.test_for_1.<locals>.<listcomp>$rZrc��g|]}|��Srrr�s  rr�z,CoroutineTest.test_for_1.<locals>.<listcomp>%rgrra)r-r\rY)	rrW�yieldedr�rdrjrRrLr*s	      @@@r�
test_for_1zCoroutineTest.test_for_1�sW�������	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�*��	'�	'�	'�	'�	'�	'��u�u�w�w�'�'�
�������a�(�(�(�����"A�"A�E�!�R�L�L�"A�"A�"A�B�B�B�����!=�!=�u�Q��}�}�!=�!=�!=�>�>�>���	!�	!�	!�	!�	!�	!��u�u�w�w�'�'�
�������a�(�(�(�����3��*�-�-�-�����!:�!:�U�1�b�\�\�!:�!:�!:�e�W�!D�E�E�E���	!�	!�	!�	!�	!�	!��u�u�w�w�'�'�
�������a�(�(�(�����"A�"A�E�!�R�L�L�"A�"A�"A�B�B�B�����!:�!:�U�1�b�\�\�!:�!:�!:�")�5�!1�"2�	3�	3�	3�	3�	3rc�"��d�tj���}�fd�}|�td��5t	|����ddd��n#1swxYwY|�tj���|��dS)Nr2c��@�K��23d{V��}td���6dS�Nznever going to happen��print)r3�tups �rrXz%CoroutineTest.test_for_2.<locals>.foo,sJ������
/�
/�
/�
/�
/�
/�
/�a��-�.�.�.�.��3�3��z/async for' requires an object.*__aiter__.*tuple��sys�getrefcountr�r�r-r\)r�refs_beforerXrts   @r�
test_for_2zCoroutineTest.test_for_2(s�������o�c�*�*��	/�	/�	/�	/�	/��
#�
#��L�N�N�	�	�
�c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
������-�-�{�;�;�;�;�;s�A�A �#A c�L��Gd�d��}|���tj���}�fd�}|�td��5t	|����ddd��n#1swxYwY|�tj���|��dS)Nc��eZdZd�ZdS)�#CoroutineTest.test_for_3.<locals>.Ic��|Srrrs rrMz-CoroutineTest.test_for_3.<locals>.I.__aiter__9r�rN�rrrrMrrr�Ir}8r�rr�c��@�K��23d{V��}td���6dSrqrr�r3�aiters �rrXz%CoroutineTest.test_for_3.<locals>.foo?�J����� �
/�
/�
/�
/�
/�
/�
/�a��-�.�.�.�.�!�5�5ruz!that does not implement __anext__rv�rr�ryrXr�s    @r�
test_for_3zCoroutineTest.test_for_37s���	�	�	�	�	�	�	�	�������o�e�,�,��	/�	/�	/�	/�	/��
#�
#��4�6�6�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
������/�/��=�=�=�=�=��
A1�1A5�8A5c�L��Gd�d��}|���tj���}�fd�}|�td��5t	|����ddd��n#1swxYwY|�tj���|��dS)Nc��eZdZd�Zd�ZdS)�#CoroutineTest.test_for_4.<locals>.Ic��|Srrrs rrMz-CoroutineTest.test_for_4.<locals>.I.__aiter__Mr�rc��dS)Nrrrs rrPz-CoroutineTest.test_for_4.<locals>.I.__anext__Ps���rrN)rrrrMrPrrrr�r�Ls2������
�
�
�
�
�
�
�
rr�c��@�K��23d{V��}td���6dSrqrrr�s �rrXz%CoroutineTest.test_for_4.<locals>.fooVr�ruz7async for' received an invalid object.*__anext__.*tuplervr�s    @r�
test_for_4zCoroutineTest.test_for_4Ks���	�	�	�	�	�	�	�	�������o�e�,�,��	/�	/�	/�	/�	/��
#�
#��I�K�K�	�	�
�c�c�e�e����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
������/�/��=�=�=�=�=r�c�������d�G�fd�d���Gd�d�����������tj���}tj���}���fd�}tj��5tjd��t|����ddd��n#1swxYwY|��d��|�tj���|��|�tj���|�����fd	�}t|����|��d
�����fd�}t|����|��d��dS)
Nrc�$��eZdZ�fd�Z�fd�ZdS)�)CoroutineTest.test_for_6.<locals>.Managerc���K��dz
�dS)NrCr)rr�s �rr�z4CoroutineTest.test_for_6.<locals>.Manager.__aenter__fs������U�
���rc���K��dz
�dS)Ni��r)rr(r�s  �rr�z3CoroutineTest.test_for_6.<locals>.Manager.__aexit__js������V����rNr�)r�s�rr�r�esG�������
�
�
�
�
�
�
�
�
�
�
�
rr�c� �eZdZd�Zd�Zd�ZdS)�*CoroutineTest.test_for_6.<locals>.Iterablec��d|_dSrIrUrs rrz3CoroutineTest.test_for_6.<locals>.Iterable.__init__orJrc��|Srrrs rrMz4CoroutineTest.test_for_6.<locals>.Iterable.__aiter__rr�rc��XK�|jdkrt�|xjdz
c_|jS�Nrnr0)r3rOrs rrPz4CoroutineTest.test_for_6.<locals>.Iterable.__anext__us0�����6�B�;�-�,�,����!�����v�
rNrQrrr�Iterabler�nsA������
�
�
�
�
�
�
�
�
�
�
rr�c���K��4�d{V���23d{V��}�dz
��
6	ddd���d{V��n#1�d{V��swxYwY�dz
�dS�Nr0rgr)r3r�r!�managers ���r�mainz&CoroutineTest.test_for_6.<locals>.main�s������
�
�
�
�
�
�
�
�'��������!���F�A�A� (�x�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
��I�A�A�As�0��0�
:�:�errori��c��T�K����4�d{V�����23d{V��}�dz
��
6	ddd���d{V��n#1�d{V��swxYwY�dz
����4�d{V�����23d{V��}�dz
��
6	ddd���d{V��n#1�d{V��swxYwY�dz
�dSr�r�r3r�r�r�s ���rr�z&CoroutineTest.test_for_6.<locals>.main�s������w�y�y�
�
�
�
�
�
�
�
�'�x�z�z��������!���F�A�A� *�z�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
��I�A��w�y�y�
�
�
�
�
�
�
�
�'�x�z�z��������!���F�A�A� *�z�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
��I�A�A�As8�A�,�A�
A
�
A
�&B�1A>�7B�
B�Bi�c��|�K����4�d{V���dz
����23d{V��}�dz
��
6�dz
�	ddd���d{V��n#1�d{V��swxYwY�dz
����4�d{V���dz
����23d{V��}�dz
��
6�dz
�	ddd���d{V��n#1�d{V��swxYwY�dz
�dS)Nr�r0i���rgrr�s ���rr�z&CoroutineTest.test_for_6.<locals>.main�sA������w�y�y�
"�
"�
"�
"�
"�
"�
"�
"��S���'�x�z�z�"�"�"�"�"�"�"�!���F�A�A� *���M�A�A�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"����
"�
"�
"�
"�
��I�A��w�y�y�
"�
"�
"�
"�
"�
"�
"�
"��S���'�x�z�z�"�"�"�"�"�"�"�!���F�A�A� *���M�A�A�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"����
"�
"�
"�
"�
��I�A�A�As8�A
�1�
A
�

A�A�0B&�B
�
B&�&
B0�3B0i��9)rwrxr7r8r9r-r\)	r�mrefs_before�irefs_beforer�r�r�r�r!r�s	    @@@@@r�
test_for_6zCoroutineTest.test_for_6bsH�������
��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	��'�)�)���8�:�:����w�/�/����x�0�0��	�	�	�	�	�	�	��
$�
&�
&�	�	��!�'�*�*�*�
�d�d�f�f����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	
����F�#�#�#�������1�1�<�@�@�@�������2�2�L�A�A�A�	�	�	�	�	�	�	�	�$�$�&�&��������F�#�#�#�	�	�	�	�	�	�	�&	�$�$�&�&��������H�%�%�%�%�%s�:,B2�2B6�9B6c�����d�Gd�d�����fd�}|�t��5t|����ddd��n#1swxYwY|��d��dS)Nrc��eZdZd�ZdS)�$CoroutineTest.test_for_7.<locals>.AIc��ddzdSr�rrs rrMz.CoroutineTest.test_for_7.<locals>.AI.__aiter__�����!����rNrrrr�AIr���#������
�
�
�
�
rr�c��F�K����23d{V��}�dz
��
6�dz
�dS�Nr0rnr�r3r�rs ��rrXz%CoroutineTest.test_for_7.<locals>.foo��R������2�4�4�
�
�
�
�
�
�
�a��q���� ��2�I�C�C�C��r�rrXr�rs  @@r�
test_for_7zCoroutineTest.test_for_7�s�������	�	�	�	�	�	�	�	�	�	�	�	�	�	�
�
�
�0�
1�
1�	�	��c�c�e�e����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����a� � � � � r c�p���d�Gd�d�����fd�}|�t��5tj��5tjd��t|����ddd��n#1swxYwYddd��n#1swxYwY|��d��dS)Nrc��eZdZd�ZdS)�$CoroutineTest.test_for_8.<locals>.AIc��ddzdSr�rrs rrMz.CoroutineTest.test_for_8.<locals>.AI.__aiter__�r�rNrrrrr�r��r�rr�c��F�K����23d{V��}�dz
��
6�dz
�dSr�rr�s ��rrXz%CoroutineTest.test_for_8.<locals>.foo�r�r�r�)rEr�r7r8r9r-r\r�s  @@r�
test_for_8zCoroutineTest.test_for_8�sd������	�	�	�	�	�	�	�	�	�	�	�	�	�	�
�
�
�0�
1�
1�	!�	!��(�*�*�
!�
!��%�g�.�.�.��#�#�%�%� � � �	
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	
����a� � � � � s5�B�,A>�2B�>B	�B�B	�B�B�Bc���Gd�d����fd�}|�td��5}|���d��ddd��n#1swxYwY|j}|�|jt��dS)Nc� �eZdZd�Zd�Zd�ZdS)�$CoroutineTest.test_for_11.<locals>.Fc��|Srrrs rrMz.CoroutineTest.test_for_11.<locals>.F.__aiter__�r�rc��|Srrrs rrPz.CoroutineTest.test_for_11.<locals>.F.__anext__�r�rc��ddzdSr�rrs rrz.CoroutineTest.test_for_11.<locals>.F.__await__�s���A����rN)rrrrMrPrrrr�Fr��sA������
�
�
�
�
�
�
�
�
�
�
rr�c��2�K����23d{V��}�6dSrr)r�r�s �rr�z'CoroutineTest.test_for_11.<locals>.main�sA������1�3�3�
�
�
�
�
�
�
�a���3�3s�z an invalid object from __anext__)r�r�r&�	exceptionrr�	__cause__r�)rr�r��errr�s    @r�test_for_11zCoroutineTest.test_for_11�s����	�	�	�	�	�	�	�	�	�	�	�	�	��
#�
#�I�$F�H�H�	�KL��D�F�F�K�K�����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��k�����c�m�->�?�?�?�?�?s�A�A� Ac�,����Gd�dt���Gd�dt���g����fd�}|����5|���d��ddd��n#1swxYwY|��dg��dS)Nc��eZdZdS)�*CoroutineTest.test_for_tuple.<locals>.DoneNrYrrr�Doner����������rr�c��eZdZdZd�Zd�ZdS)�+CoroutineTest.test_for_tuple.<locals>.AIterrc��|Srrrs rrMz5CoroutineTest.test_for_tuple.<locals>.AIter.__aiter__�r�rc��K�|jt|��krt�|xjdz
c_||jdz
Sr�)r3�lenrOrs rrPz5CoroutineTest.test_for_tuple.<locals>.AIter.__anext__�sA�����6�S��Y�Y�&�-�,�,����!�����D�F�Q�J�'�'rN�rrrr3rMrPrrr�AIterr��s7�������A�
�
�
�
(�
(�
(�
(�
(rr�c��`�K��dg��23d{V��}��|���6��r6rT�r3r�r�r+s ���rrXz)CoroutineTest.test_for_tuple.<locals>.foosX����� �5�"��;�;�
!�
!�
!�
!�
!�
!�
!�a��
�
�a� � � � �'��Js�-r7)r�r�rEr&r\�rrXr�r�r+s  @@@r�test_for_tuplezCoroutineTest.test_for_tuple�s�����#�#�#�#�#�9�#�#�#�	(�	(�	(�	(�	(�E�	(�	(�	(���	�	�	�	�	�	�	�
�
�
�t�
$�
$�	�	��C�E�E�J�J�t����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����"��&�&�&�&�&��A2�2A6�9A6c�,����Gd�dt���Gd�dt���g����fd�}|����5|���d��ddd��n#1swxYwY|��dg��dS)Nc��eZdZdS)�3CoroutineTest.test_for_stop_iteration.<locals>.DoneNrYrrrr�r�
r�rr�c��eZdZdZd�Zd�ZdS)�4CoroutineTest.test_for_stop_iteration.<locals>.AIterrc��|Srrrs rrMz>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__aiter__r�rc��PK�|jrt�|xjdz
c_|jSr�)r3rOrrs rrPz>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__anext__s-�����6�-�,�,����!�����z�!rNr�rrrr�r�s7�������A�
�
�
�
"�
"�
"�
"�
"rr�c��^�K��d��23d{V��}��|���6��r6rTr�s ���rrXz2CoroutineTest.test_for_stop_iteration.<locals>.foosV����� �5��9�9�
!�
!�
!�
!�
!�
!�
!�a��
�
�a� � � � �%��Js�,r7)r�r'rEr&r\r�s  @@@r�test_for_stop_iterationz%CoroutineTest.test_for_stop_iteration	s�����#�#�#�#�#�9�#�#�#�	"�	"�	"�	"�	"�M�	"�	"�	"���	�	�	�	�	�	�	�
�
�
�t�
$�
$�	�	��C�E�E�J�J�t����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����"��&�&�&�&�&r�c���d���fd�}�fd�}�fd�}�fd�}|�t|����gddgf��|�t|����gddhf��|�t|����gddd	�f��|�t|����gddd
�f��dS)Nc��
K�|SrrrUs rr|z$CoroutineTest.test_comp_1.<locals>.f!������Hrc��T�K�d��d���d��fD���d{V��S)Nc��"K�g|]
}|�d{V����Srr�r�r�s  rr�z?CoroutineTest.test_comp_1.<locals>.run_list.<locals>.<listcomp>%�(����3�3�3��!�G�G�G�G�G�G�3�3�3rr0�)rr�s�r�run_listz+CoroutineTest.test_comp_1.<locals>.run_list$�A�����3�3�a�a��d�d�A�A�b�E�E�]�3�3�3�3�3�3�3�3�3�3rc��T�K�d��d���d��fD���d{V��S)Nc��"K�h|]
}|�d{V����Srrr�s  r�	<setcomp>z=CoroutineTest.test_comp_1.<locals>.run_set.<locals>.<setcomp>(r�rr0r�rr�s�r�run_setz*CoroutineTest.test_comp_1.<locals>.run_set'r�rc��T�K�d��d���d��fD���d{V��S)Nc��$K�i|]}|�d{V��d��S)Nr�rr�s  r�
<dictcomp>z@CoroutineTest.test_comp_1.<locals>.run_dict1.<locals>.<dictcomp>+s*����8�8�8�Q�!�G�G�G�G�G�G�S�8�8�8rr0r�rr�s�r�	run_dict1z,CoroutineTest.test_comp_1.<locals>.run_dict1*sA�����8�8�1�1�Q�4�4���2���-�8�8�8�8�8�8�8�8�8�8rc��n�K�d�t�d���d��g��D���d{V��S)Nc��*K�i|]\}}||�d{V����Srr)r�r3r�s   rr�z@CoroutineTest.test_comp_1.<locals>.run_dict2.<locals>.<dictcomp>.s.����D�D�D�4�1�a�A�Q�w�w�w�w�w�w�D�D�Drr0r�)�	enumerater�s�r�	run_dict2z,CoroutineTest.test_comp_1.<locals>.run_dict2-sI�����D�D�9�a�a��d�d�A�A�b�E�E�]�+C�+C�D�D�D�D�D�D�D�D�D�Drr0r�r�)r0r�)rr0r9)rr�r�r�r�r|s     @r�test_comp_1zCoroutineTest.test_comp_1 s;���	�	�	�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	9�	9�	9�	9�	9�	E�	E�	E�	E�	E�	
����8�8�:�:�.�.��a��W�
�>�>�>�����7�7�9�9�-�-��Q��G�}�=�=�=�����9�9�;�;�/�/�"�#�3�6G�6G�1H�I�I�I�����9�9�;�;�/�/�"�!��m�m�1D�E�E�E�E�Erc�F��d���fd�}|�t|����ggd�f���fd�}|�t|����ghd�f���fd�}|�t|����gddhf��dS)	Nc��
K�|SrrrUs rr|z$CoroutineTest.test_comp_2.<locals>.f6r�rc���K�d��d���d���d���ddg��fD���d{V��S)Nc��,K�g|]}|�d{V��D]}|���Srr�r�r��ss   rr�z?CoroutineTest.test_comp_2.<locals>.run_list.<locals>.<listcomp>:sL����&�&�&�!�#$�W�W�W�W�W�W�&�&���&�&�&�&r��abc�de�fgrr�s�rr�z+CoroutineTest.test_comp_2.<locals>.run_list9sr�����&�&���"���q�q��x�x���2�����4��,���H�&�&�&�&�&�&�&�&�&�
&r)r�rr�r�rc��n�K�d���ddg���dg��g��fD���d{V��S)Nc��BK�h|]}|�d{V��D]}|�d{V��D]}|����Srr)r�r�r��ds    rr�z=CoroutineTest.test_comp_2.<locals>.run_set.<locals>.<setcomp>Bsr����&�&�&��#$�W�W�W�W�W�W�&�&��#$�W�W�W�W�W�W�	&�&��	�&�&�&�&�&rrn�r`rr�s�rr�z*CoroutineTest.test_comp_2.<locals>.run_setAsw�����&�&��a���B��8���!"��B�4���!*�+�+�,�&�&�&�&�&�&�&�&�&�
&r>rnr`rc��h�K�d���d���d��g��fD���d{V��S)Nc��8K�h|]}|�d{V��D]
}|�d{V�����Srrr�s   rr�z>CoroutineTest.test_comp_2.<locals>.run_set2.<locals>.<setcomp>MsY����&�&�&��#$�W�W�W�W�W�W�&�&���G�G�G�G�G�G�&�&�&�&rrnr`rr�s�r�run_set2z+CoroutineTest.test_comp_2.<locals>.run_set2Lsg�����&�&��a���2�����"����/�/�0�&�&�&�&�&�&�&�&�&�
&rrnr`r9)rr�r�rr|s    @r�test_comp_2zCoroutineTest.test_comp_25s���	�	�	�	&�	&�	&�	&�	&�	
����h�h�j�j�!�!�
�,�,�,�-�	/�	/�	/�	&�	&�	&�	&�	&�	
����g�g�i�i� � �
�����	 �	 �	 �	&�	&�	&�	&�	&�
	
����h�h�j�j�!�!�
�"�b��N�	�	�	�	�	rc���d���fd�}|�t|����gddgf���fd�}|�t|����gddhf���fd�}|�t|����gddd	�f���fd
�}|�t|����gddgf��dS)
Nc�K�|D]}|WV��dSrr�rr3s  rr|z$CoroutineTest.test_comp_3.<locals>.fV�,�����
�
��������
�
rc��B�K�d��ddg��2���d{V��S)Nc��(K�g|3d{V��}|dz��
6Sr�rr�s  rr�z?CoroutineTest.test_comp_3.<locals>.run_list.<locals>.<listcomp>[�2����5�5�5�5�5�5�5�5�A�A��E�5�5�5�5��rnr`rr�s�rr�z+CoroutineTest.test_comp_3.<locals>.run_listZ�9�����5�5���B��8���5�5�5�5�5�5�5�5�5�5rr[rhc��B�K�d��ddg��2���d{V��S)Nc��(K�h|3d{V��}|dz��
6Sr�rr�s  rr�z=CoroutineTest.test_comp_3.<locals>.run_set.<locals>.<setcomp>arrrnr`rr�s�rr�z*CoroutineTest.test_comp_3.<locals>.run_set`rrc��B�K�d��ddg��2���d{V��S)Nc��0K�i|3d{V��}|dz|dz��6Sr�rr�s  rr�z?CoroutineTest.test_comp_3.<locals>.run_dict.<locals>.<dictcomp>gs8����<�<�<�<�<�<�<�<�1�A��E�1�q�5�<�<�<�<s�rnr`rr�s�r�run_dictz+CoroutineTest.test_comp_3.<locals>.run_dictfs9�����<�<���2�r�(���<�<�<�<�<�<�<�<�<�<r��)r[rhc��Z�K�d��ddg��2��}d�|2���d{V��S)Nc�.K�|3d{V��}|dzWV��6dSr�rr�s  r�	<genexpr>z=CoroutineTest.test_comp_3.<locals>.run_gen.<locals>.<genexpr>ms;����4�4�4�4�4�4�4�1�1�q�5�4�4�4�4�4�4�4�4��rnr`c��(K�g|3d{V��}|dz��
6S�Nr�r�r�r�s  rr�z>CoroutineTest.test_comp_3.<locals>.run_gen.<locals>.<listcomp>n�2����/�/�/�/�/�/�/�/�a�A��G�/�/�/�/rr�rgr|s �r�run_genz*CoroutineTest.test_comp_3.<locals>.run_genlsL�����4�4���2�r�(���4�4�4�C�/�/�3�/�/�/�/�/�/�/�/�/�/r�o�yr9�rr�r�rr"r|s     @r�test_comp_3zCoroutineTest.test_comp_3UsX���	�	�	�	6�	6�	6�	6�	6�����h�h�j�j�!�!�
�"�b��N�	�	�	�	6�	6�	6�	6�	6�����g�g�i�i� � �
�"�b��N�	�	�	�	=�	=�	=�	=�	=�����h�h�j�j�!�!�
�b�b�!�!�"�	$�	$�	$�	0�	0�	0�	0�	0�	
����g�g�i�i� � �
�#�s���	�	�	�	�	rc���d���fd�}|�t|����gdgf���fd�}|�t|����gdhf���fd�}|�t|����gddif���fd�}|�t|����gdgf��dS)	Nc�K�|D]}|WV��dSrrrs  rr|z$CoroutineTest.test_comp_4.<locals>.ftrrc��B�K�d��ddg��2���d{V��S)Nc��4K�g|3d{V��}|dk�
|dz��6Sr�rr�s  rr�z?CoroutineTest.test_comp_4.<locals>.run_list.<locals>.<listcomp>y�;����?�?�?�?�?�?�?�?�A��B��?�A��E�?�?�?�?��rnr`rr�s�rr�z+CoroutineTest.test_comp_4.<locals>.run_listx�9�����?�?���B��8���?�?�?�?�?�?�?�?�?�?rrhc��B�K�d��ddg��2���d{V��S)Nc��4K�h|3d{V��}|dk�
|dz��6Sr�rr�s  rr�z=CoroutineTest.test_comp_4.<locals>.run_set.<locals>.<setcomp>r+r,rnr`rr�s�rr�z*CoroutineTest.test_comp_4.<locals>.run_set~r-rc��B�K�d��ddg��2���d{V��S)Nc��<K�i|3d{V��}|dk�
|dz|dz��6S)Nrnr0r/rr�s  rr�z?CoroutineTest.test_comp_4.<locals>.run_dict.<locals>.<dictcomp>�sA����F�F�F�F�F�F�F�F�1�q�2�v�F�A��E�1�q�5�F�F�F�Fs�rnr`rr�s�rrz+CoroutineTest.test_comp_4.<locals>.run_dict�s9�����F�F���2�r�(���F�F�F�F�F�F�F�F�F�Frrc��Z�K�d��ddg��2��}d�|2���d{V��S)Nc�:K�|3d{V��}|dk�
|dzWV��6dSr�rr�s  rrz=CoroutineTest.test_comp_4.<locals>.run_gen.<locals>.<genexpr>�sD����>�>�>�>�>�>�>�1�q�2�v�>�1�q�5�>�>�>�>�>�>�>�>s�rnr`c��(K�g|3d{V��}|dz��
6Srrrs  rr�z>CoroutineTest.test_comp_4.<locals>.run_gen.<locals>.<listcomp>�r rrr!s �rr"z*CoroutineTest.test_comp_4.<locals>.run_gen�sL�����>�>���2�r�(���>�>�>�C�/�/�3�/�/�/�/�/�/�/�/�/�/rr$r9r%s     @r�test_comp_4zCoroutineTest.test_comp_4ss[���	�	�	�	@�	@�	@�	@�	@�����h�h�j�j�!�!�
�"��J�	�	�	�	@�	@�	@�	@�	@�����g�g�i�i� � �
�"��J�	�	�	�	G�	G�	G�	G�	G�����h�h�j�j�!�!�
�"�b��N�	�	�	�	0�	0�	0�	0�	0�	
����g�g�i�i� � �
�#��K�	�	�	�	�	rc���d���fd�}|�t|����ggd�f���fd�}|�t|����ghd�f���fd�}|�t|����gddd	d�f���fd
�}|�t|����ggd�f��dS)Nc�K�|D]}|WV��dSrrrs  rr|z&CoroutineTest.test_comp_4_2.<locals>.f�rrc��X�K�d��td����2���d{V��S)Nc��HK�g|3d{V��}d|cxkrdk�nn|dz��6S�Nrrrnrr�s  rr�zACoroutineTest.test_comp_4_2.<locals>.run_list.<locals>.<listcomp>��S����C�C�C�C�C�C�C�C�Q��Q�C�C�C�C��C�C�C�C�C�A��F�C�C�C�C��"�rr�s�rr�z-CoroutineTest.test_comp_4_2.<locals>.run_list��;�����C�C�!�!�E�!�H�H�+�+�C�C�C�C�C�C�C�C�C�Cr)r[r�
c��X�K�d��td����2���d{V��S)Nc��HK�h|3d{V��}d|cxkrdk�nn|dz��6Sr:rr�s  rr�z?CoroutineTest.test_comp_4_2.<locals>.run_set.<locals>.<setcomp>�r;r<r=rr�s�rr�z,CoroutineTest.test_comp_4_2.<locals>.run_set�r>r>r[rr?c��X�K�d��td����2���d{V��S)Nc��PK�i|3d{V��}d|cxkrdk�nn	|dz|dz��!6S)Nrrrnr�rr�s  rr�zACoroutineTest.test_comp_4_2.<locals>.run_dict.<locals>.<dictcomp>�sY����L�L�L�L�L�L�L�L�a�!�a�L�L�L�L�!�L�L�L�L�L�A��F�A��G�L�L�L�Ls�&r=rr�s�rrz-CoroutineTest.test_comp_4_2.<locals>.run_dict�s;�����L�L�1�1�U�1�X�X�;�;�L�L�L�L�L�L�L�L�L�Lrr]r��gc��p�K�d��td����2��}d�|2���d{V��S)Nc�NK�|3d{V��}d|cxkrdk�nn|dzWV�� 6dSr:rr�s  rrz?CoroutineTest.test_comp_4_2.<locals>.run_gen.<locals>.<genexpr>�s\����B�B�B�B�B�B�B�A��A�B�B�B�B��B�B�B�B�B�1�r�6�B�B�B�B�B�B�B�Bs�$r=c��(K�g|3d{V��}|dz��
6Srrrs  rr�z@CoroutineTest.test_comp_4_2.<locals>.run_gen.<locals>.<listcomp>�r rrr!s �rr"z,CoroutineTest.test_comp_4_2.<locals>.run_gen�sN�����B�B���5��8�8���B�B�B�C�/�/�3�/�/�/�/�/�/�/�/�/�/r)r#�p�qr9r%s     @r�
test_comp_4_2zCoroutineTest.test_comp_4_2�sk���	�	�	�	D�	D�	D�	D�	D�����h�h�j�j�!�!�
�����	 �	 �	 �	D�	D�	D�	D�	D�����g�g�i�i� � �
�����	 �	 �	 �	M�	M�	M�	M�	M�����h�h�j�j�!�!�
�c�s��,�,�-�	/�	/�	/�	0�	0�	0�	0�	0�	
����g�g�i�i� � �
����!�	#�	#�	#�	#�	#rc�t��d���fd�}|�t|����gdgf��dS)Nc�K�|D]}|WV��dSrrrs  rr|z$CoroutineTest.test_comp_5.<locals>.f�rrc��<�K��fd�ddgddgfD���d{V��S)Nc��l�K�g|].}|ddk��|��23d{V��	}|dk�|dz��6�/S)rrnNrr0r)r��pairr3r|s   �rr�z?CoroutineTest.test_comp_5.<locals>.run_list.<locals>.<listcomp>�s������6�6�6�d�d�1�g��l�6�#$�1�T�7�7�6�6�6�6�6�6�6�6��a�"�f�6�A��E�6�6�6�6�6s�3rnr`r�(rr�s�rr�z+CoroutineTest.test_comp_5.<locals>.run_list�s\�����6�6�6�6��B�x�"�b��&:�6�6�6�6�6�6�6�6�6�
6rr�r9�rr�r|s  @r�test_comp_5zCoroutineTest.test_comp_5�si���	�	�	�	6�	6�	6�	6�	6�	
����h�h�j�j�!�!�
�"��J�	�	�	�	�	rc�v��d���fd�}|�t|����ggd�f��dS)Nc�K�|D]}|WV��dSrrrs  rr|z$CoroutineTest.test_comp_6.<locals>.f�rrc��B�K�d��ddg��2���d{V��S)Nc��2K�g|3d{V��}|D]}|dz���6Sr�r)r��seqr3s   rr�z?CoroutineTest.test_comp_6.<locals>.run_list.<locals>.<listcomp>�sb����"�"�"�"�"�"�"�"�C� �"�"����E�"�"�"�"�"s��rnr`)rrr�s�rr�z+CoroutineTest.test_comp_6.<locals>.run_list�sT�����"�"�1�1�h��->�+?�+?�"�"�"�"�"�"�"�"�"�
"r)r[rh�r9rQs  @r�test_comp_6zCoroutineTest.test_comp_6�sl���	�	�	�	"�	"�	"�	"�	"�	
����h�h�j�j�!�!�
�����	 �	 �	 �	 �	 rc���d���fd�}|�td��5t|����ddd��dS#1swxYwYdS)Nc�8K�dWV�dWV�td���)Nr0r/�aaa)r�rrrr|z$CoroutineTest.test_comp_7.<locals>.f�s*�����G�G�G�G��G�G�G�G��E�"�"�"rc��<�K�d����2���d{V��S)Nc��"K�g|3d{V��}|��
6Srrr�s  rr�z?CoroutineTest.test_comp_7.<locals>.run_list.<locals>.<listcomp>��.����)�)�)�)�)�)�)�)��A�)�)�)�)��rr�s�rr�z+CoroutineTest.test_comp_7.<locals>.run_list�s3�����)�)�Q�Q�S�S�)�)�)�)�)�)�)�)�)�)rr])r�r�r-rQs  @r�test_comp_7zCoroutineTest.test_comp_7�s����	#�	#�	#�
	*�	*�	*�	*�	*��
#�
#�I�u�
5�
5�	"�	"��h�h�j�j�!�!�!�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�	"�	"s�A
�
A�Ac�j�d�}|�t|����ggd�f��dS)Nc��K�d�dD��S)Nc��g|]}|��Srrr�s  rr�z8CoroutineTest.test_comp_8.<locals>.f.<locals>.<listcomp>�s��)�)�)�!�A�)�)�)rr2rrrrr|z$CoroutineTest.test_comp_8.<locals>.f�s����)�)�y�)�)�)�)rr2r9�rr|s  r�test_comp_8zCoroutineTest.test_comp_8�sO��	*�	*�	*�	
����a�a�c�c�N�N�
����O�	�	�	�	�	rc�v��d���fd�}|�t|����gddgf��dS)Nc�K�dWV�dWV�dSr�rrrrrgz&CoroutineTest.test_comp_9.<locals>.gen�s �����G�G�G�G��G�G�G�G�G�Grc��T�K�d����2���d{V��}d�|D��S)Nc��"K�g|3d{V��}|��
6Srrr�s  rr�z8CoroutineTest.test_comp_9.<locals>.f.<locals>.<listcomp>�s.����(�(�(�(�(�(�(�(�Q��(�(�(�(rac��g|]}|��Srrr�s  rr�z8CoroutineTest.test_comp_9.<locals>.f.<locals>.<listcomp>�s��>�>�>�!�A�>�>�>rr)�lrgs �rr|z$CoroutineTest.test_comp_9.<locals>.f�sB�����(�(�#�#�%�%�(�(�(�(�(�(�(�(�(�A�!�>�q�>�>�>�!rr0r/r9�rr|rgs  @r�test_comp_9zCoroutineTest.test_comp_9�si���	�	�	�	"�	"�	"�	"�	"�	
����a�a�c�c�N�N�
�!�Q��L�	�	�	�	�	rc�n�d�}|�t|����gdddd�f��dS)Nc��6K�d�dD��}d�|D��S)Nc��h|]}|��Srrr�s  rr�z8CoroutineTest.test_comp_10.<locals>.f.<locals>.<setcomp>�s��'�'�'��!�'�'�'rr2c��i|]}||��Srr�r�r"s  rr�z9CoroutineTest.test_comp_10.<locals>.f.<locals>.<dictcomp>�s��%�%�%�Q�A�q�%�%�%rr)�xxs rr|z%CoroutineTest.test_comp_10.<locals>.f�s-����'�'�Y�'�'�'�B�%�%�"�%�%�%�%rr0r/r	r2r9rfs  r�test_comp_10zCoroutineTest.test_comp_10�sV��	&�	&�	&�	
����a�a�c�c�N�N�
�Q�1��#�#�$�	&�	&�	&�	&�	&rc�d�d�}|�t|����gddgddggf��d�}|�t|����gddhddhgf��d�}|�t|����gdd	hf��d
�}|�t|����gddd�ddd�d�f��d
�}|�t|����gddgddggf��d�}|�t|����ggd�f��d�}|�t|����ggd�f��d�}|�t|����gddgddggddgddgggf��dS)Nc��*K�d�dD���d{V��S)Nc��Z�K�g|]%��fd�tddg��2���d{V����&S)c��*�K�g|3d{V��}|�z��
6Srr�r�r3�js  �rr�z[CoroutineTest.test_nested_comp.<locals>.run_list_inside_list.<locals>.<listcomp>.<listcomp>��3�����<�<�<�<�<�<�<�<�Q�Q��U�<�<�<�<��r0r/N�r#�r�r|s @rr�zPCoroutineTest.test_nested_comp.<locals>.run_list_inside_list.<locals>.<listcomp>��P�����O�O�O��<�<�<�<�)�Q��F�*;�*;�<�<�<�<�<�<�<�<�<�O�O�OrrXrrrr�run_list_inside_listz<CoroutineTest.test_nested_comp.<locals>.run_list_inside_list��,����O�O�h�O�O�O�O�O�O�O�O�O�Orr[rrhrc��*K�d�dD���d{V��S)Nc��Z�K�g|]%��fd�tddg��2���d{V����&S)c��*�K�h|3d{V��}|�z��
6Srrr{s  �rr�zYCoroutineTest.test_nested_comp.<locals>.run_set_inside_list.<locals>.<listcomp>.<setcomp>�r}r~r0r/Nrr�s @rr�zOCoroutineTest.test_nested_comp.<locals>.run_set_inside_list.<locals>.<listcomp>�r�rrXrrrr�run_set_inside_listz;CoroutineTest.test_nested_comp.<locals>.run_set_inside_list�r�rc��*K�d�dD���d{V��S)Nc
��K�h|];}td�tt|����2���d{V������<S)c��"K�g|3d{V��}|��
6Srrr�s  rr�zYCoroutineTest.test_nested_comp.<locals>.run_list_inside_set.<locals>.<setcomp>.<listcomp>�s.����>�>�>�>�>�>�>�>�Q��>�>�>�>raN)r�r#rYr�s  rr�zNCoroutineTest.test_nested_comp.<locals>.run_list_inside_set.<locals>.<setcomp>�sS����P�P�P�A�C�>�>�)�E�!�H�H�*=�*=�>�>�>�>�>�>�>�>�>�?�?�P�P�Pr�r	r=rrrr�run_list_inside_setz;CoroutineTest.test_nested_comp.<locals>.run_list_inside_set�s,����P�P��P�P�P�P�P�P�P�P�P�Prr	rnc��*K�d�dD���d{V��S)Nc��\�K�i|]&���fd�tddg��2���d{V����'S)c��,�K�i|3d{V��}||�z��6Srrr{s  �rr�z[CoroutineTest.test_nested_comp.<locals>.run_dict_inside_dict.<locals>.<dictcomp>.<dictcomp>s5�����B�B�B�B�B�B�B�B�1��1�q�5�B�B�B�Bs�r0r/Nrr�s @rr�zPCoroutineTest.test_nested_comp.<locals>.run_dict_inside_dict.<locals>.<dictcomp>sR�����U�U�U�q�A�B�B�B�B�	�1�a�&�0A�0A�B�B�B�B�B�B�B�B�B�U�U�UrrXrrrr�run_dict_inside_dictz<CoroutineTest.test_nested_comp.<locals>.run_dict_inside_dicts,����U�U�H�U�U�U�U�U�U�U�U�U�Ur)r0r/rXc��BK�d�dD��}d�|2���d{V��S)Nc�`�K�|](��fd�tddg��2���d{V��WV��)dS)c��*�K�g|3d{V��}|�z��
6Srrr{s  �rr�zYCoroutineTest.test_nested_comp.<locals>.run_list_inside_gen.<locals>.<genexpr>.<listcomp>s3�����;�;�;�;�;�;�;�;�A�A��E�;�;�;�;r~r0r/Nrr�s @rrzNCoroutineTest.test_nested_comp.<locals>.run_list_inside_gen.<locals>.<genexpr>sY�����N�N��;�;�;�;��A�q�6�):�):�;�;�;�;�;�;�;�;�;�N�N�N�N�N�N�NrrXc��"K�g|3d{V��}|��
6Srrrts  rr�zOCoroutineTest.test_nested_comp.<locals>.run_list_inside_gen.<locals>.<listcomp>r`rarr�s r�run_list_inside_genz;CoroutineTest.test_nested_comp.<locals>.run_list_inside_gen
s?����N�N�X�N�N�N�C�)�)�S�)�)�)�)�)�)�)�)�)�)rc��BK�d�dD��}d�|D���d{V��S)Nc�Z�g|](}d�tt|����2����)S)c�(K�|3d{V��}|WV��
6dSrrr�s  rrzYCoroutineTest.test_nested_comp.<locals>.run_gen_inside_list.<locals>.<listcomp>.<genexpr>�7����:�:�:�:�:�:�:��Q�:�:�:�:�:�:�:�:���r#rYr�s  rr�zOCoroutineTest.test_nested_comp.<locals>.run_gen_inside_list.<locals>.<listcomp>s5��K�K�K�q�:�:�i��a���&9�&9�:�:�:�K�K�Krr�c��,K�g|]}|23d{V��}|��
6�Srr�r�r�r"s   rr�zOCoroutineTest.test_nested_comp.<locals>.run_gen_inside_list.<locals>.<listcomp>�;����5�5�5�!�1�5�5�5�5�5�5�5�a�A�5�5�5�5�5��r��genss r�run_gen_inside_listz;CoroutineTest.test_nested_comp.<locals>.run_gen_inside_list�?����K�K�F�K�K�K�D�5�5�t�5�5�5�5�5�5�5�5�5�5r)rr0r/rr0r/r	rc��BK�d�dD��}d�|D���d{V��S)Nc3�bK�|]*}d�tt|����2��V��+dS)c�(K�|3d{V��}|WV��
6dSrrr�s  rrzWCoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen.<locals>.<genexpr>.<genexpr>r�r�Nr�r�s  rrzMCoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen.<locals>.<genexpr>s?����K�K�q�:�:�i��a���&9�&9�:�:�:�K�K�K�K�K�Krr�c��,K�g|]}|23d{V��}|��
6�Srrr�s   rr�zNCoroutineTest.test_nested_comp.<locals>.run_gen_inside_gen.<locals>.<listcomp>r�r�rr�s r�run_gen_inside_genz:CoroutineTest.test_nested_comp.<locals>.run_gen_inside_genr�rc��*K�d�dD���d{V��S)Nc��<�K�g|]��fd�dD���d{V����S)c��^��K�g|]&���fd�tddg��2���d{V����'S)c��0�K�g|3d{V��}|�z�z��6Srr)r�r3r|�ks  ��rr�zrCoroutineTest.test_nested_comp.<locals>.run_list_inside_list_inside_list.<locals>.<listcomp>.<listcomp>.<listcomp> s7�����A�A�A�A�A�A�A�A�!�a�!�e�a�i�A�A�A�As�r0r/Nr)r�r|r�s @�rr�zgCoroutineTest.test_nested_comp.<locals>.run_list_inside_list_inside_list.<locals>.<listcomp>.<listcomp> sd������(�(�(��B�A�A�A�A�y�!�Q��/@�/@�A�A�A�A�A�A�A�A�A�(�(�(rrXNr)r�r�s @rr�z\CoroutineTest.test_nested_comp.<locals>.run_list_inside_list_inside_list.<locals>.<listcomp> sl�����)�)�)��(�(�(�(�&�(�(�(�(�(�(�(�(�(�)�)�)r)r�rerrrr� run_list_inside_list_inside_listzHCoroutineTest.test_nested_comp.<locals>.run_list_inside_list_inside_listsE����)�)�'�)�)�)�)�)�)�)�)�)�
)rr#rHr$�z��������r9)	rr�r�r�r�r�r�r�r�s	         r�test_nested_compzCoroutineTest.test_nested_comp�s���	P�	P�	P�����*�*�,�,�-�-�
�2�r�(�R��H�%�&�	(�	(�	(�	P�	P�	P�����)�)�+�+�,�,�
�2�r�(�R��H�%�&�	(�	(�	(�	Q�	Q�	Q�����)�)�+�+�,�,�
�!�R��M�	�	�	�	V�	V�	V�����*�*�,�,�-�-�
�"��n�n�b�R�.�.�9�9�:�	<�	<�	<�	*�	*�	*�	
����)�)�+�+�,�,�
�2�r�(�R��H�%�&�	(�	(�	(�	6�	6�	6�	
����)�)�+�+�,�,�
�)�)�)�*�	,�	,�	,�	6�	6�	6�	
����(�(�*�*�+�+�
�)�)�)�*�	,�	,�	,�	)�	)�	)�	
����6�6�8�8�9�9�
�C��:��S�z�*�c�3�Z�#�s��,D�E�F�	H�	H�	H�	H�	Hrc��d�}|��}|�t��5tj|��ddd��n#1swxYwY|���}	|�t��5tj|��ddd��n#1swxYwY|���dS#|���wxYw)Nc��
K�dSrrrrrr�z%CoroutineTest.test_copy.<locals>.func(r�r)rEr��copyrr�)rr�r)r2s    r�	test_copyzCoroutineTest.test_copy's=������t�v�v��
�
�
�y�
)�
)�	�	��I�d�O�O�O�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��^�^�
�
��	��"�"�9�-�-�
�
��	�"�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�H�H�J�J�J�J�J��B�H�H�J�J�J�J���sA�A	�	A
�A
�)C�B$�C�$B(�(C�+B(�,C�Cc�n�d�}|��}ttjdz��D]U}|�ttjf��5tj||��ddd��n#1swxYwY�V|���}	ttjdz��D]U}|�ttjf��5tj||��ddd��n#1swxYwY�V	|���dS#|���wxYw)Nc��
K�dSrrrrrr�z'CoroutineTest.test_pickle.<locals>.func5r�rr0)	rY�pickle�HIGHEST_PROTOCOLrEr��
PicklingError�dumpsrr�)rr�r)�protor2s     r�test_picklezCoroutineTest.test_pickle4s�������t�v�v���6�2�Q�6�7�7�	*�	*�E��"�"�I�v�/C�#D�E�E�
*�
*���T�5�)�)�)�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*����
*�
*�
*�
*���^�^�
�
��	��v�6��:�;�;�
,�
,���&�&�	�6�3G�'H�I�I�,�,��L��U�+�+�+�,�,�,�,�,�,�,�,�,�,�,����,�,�,�,��
,�
�H�H�J�J�J�J�J��B�H�H�J�J�J�J���sC�A4�4A8	�;A8	�AD�C;�/D�;C?	�?D�C?	�D�D4c���d�}tj��5tj��5}tjd��|��}t|��}d}tj��|�dt|j	j
����|�t|j	j��|��ddd��n#1swxYwYddd��dS#1swxYwYdS)Nc��
K�dSrrrrrr�z3CoroutineTest.test_fatal_coro_warning.<locals>.funcEr�rr�zwas never awaited)
r7r8r�catch_unraisable_exception�filterwarningsr�r:r��str�
unraisable�	exc_valuer\�object)rr�r;r)�	coro_reprs     r�test_fatal_coro_warningz%CoroutineTest.test_fatal_coro_warningCs������
�
$�
&�
&�
	D�
	D�
�
/�
1�
1�
	D�57��#�G�,�,�,��4�6�6�D��T�
�
�I��D��� � � ��M�M�-�s�2�=�3J�/K�/K�L�L�L����T�"�-�"6�7�7��C�C�C�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D����
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D�
	D����
	D�
	D�
	D�
	D�
	D�
	Ds5�C,�BC�C,�C	�C,�C	�C,�,C0�3C0c�x����Gd�d��}|���d�����fd�}��t|����gdf�����fd�}��t|����gdf�����fd�}��t|����gdf��dS)Nc��eZdZd�ZdS)�MCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTargetc� �td���r6�rO)r�keyrs   r�__setitem__zYCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTarget.__setitem__T���(��,�,�,rN)rrrr�rrr�	BadTargetr�S�#������
-�
-�
-�
-�
-rr�c�K�dWV�dSrmrrrr�sourcezJCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.sourceWs�����H�H�H�H�H�Hrc����K���t��5}���23d{V���d<�6	ddd��n#1swxYwY��|jjd��dS)Nr�r7rb�rErOr\r�r(�r;rr��tgts ���r�run_forzKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_forZs�������"�"�#5�6�6�
�"�$*�F�H�H��������#�a�&��%-�H�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
���R�\�.��6�6�6��5��A�4�A�A�	Arbc����K���t��5}�fd����2���d{V��cddd��S#1swxYwY��|jjd��dS)Nc��*�K�g|3d{V���d<d��
6SrIr�r�r�s �rr�z`CoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_list.<locals>.<listcomp>ds3�����7�7�7�7�7�7�7�7�C��F��7�7�7�7r~r�rbr�r�s ���rr�zLCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_listbs�������"�"�#5�6�6�
8�"�7�7�7�7�f�f�h�h�7�7�7�7�7�7�7�7�7�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8����
8�
8�
8�
8����R�\�.��6�6�6��5s�A�A�Ac��j�K��fd����2��}|�d��}��t��5}|�d{V��ddd��n#1swxYwY��|jjt����|jjjd��dS)Nc�0�K�|3d{V���d<dWV��6dSrIrr�s �rrz^CoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_gen.<locals>.<genexpr>js<�����2�2�2�2�2�2�2�s�1�v�1�2�2�2�2�2�2�2�2s�r�rb�	�asendrEr�rrr�r�rOr\r()rgr�r;rr�r�s   ���rr"zKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_genis������2�2�2�2�����2�2�2�C��	�	�$���A��"�"�<�0�0�
�B���������
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��!�!�"�,�"8�:L�M�M�M����R�\�3�8�%�@�@�@��5s�		A�A"�%A"r9)rr�r�r�r"r�r�s`    @@r�,test_for_assign_raising_stop_async_iterationz:CoroutineTest.test_for_assign_raising_stop_async_iterationRs6�����	-�	-�	-�	-�	-�	-�	-�	-��i�k�k��	�	�	�	�	�	�	�	�	�	�	
����7�7�9�9�-�-��E�{�;�;�;�	�	�	�	�	�	�	�
	
����8�8�:�:�.�.��U��<�<�<�	�	�	�	�	�	�	�	
����7�7�9�9�-�-��E�{�;�;�;�;�;rc�b����Gd�d����fd����fd�}��t|����gdf����fd�}��t|����gdf����fd�}��t|����gdf��dS)Nc��eZdZd�ZdS)�QCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterablec� �td���r6r�rs rr�zZCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterable.__iter__ur�rN)rrrr�rrr�BadIterabler�tr�rr�c�&�K����WV�dSrr)r�s�r�badpairszNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.badpairsws"������+�-�-������rc����K���t��5}���23d{V��\}}�6	ddd��n#1swxYwY��|jjd��dS)Nr�rbr�)r;r3r|r�rs   ��rr�zMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_forzs�������"�"�#5�6�6�
�"�"*�(�*�*��������$�!�Q��#-�*�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
���R�\�.��6�6�6��5r�rbc����K���t��5}d����2���d{V��cddd��S#1swxYwY��|jjd��dS)Nc��(K�g|3d{V��\}}d��
6SrIrr{s   rr�zbCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_list.<locals>.<listcomp>�s2����7�7�7�7�7�7�7�7�D�A�q��7�7�7�7rr�rbr�)r;r�rs ��rr�zNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_list�s�������"�"�#5�6�6�
8�"�7�7�H�H�J�J�7�7�7�7�7�7�7�7�7�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8�
8����
8�
8�
8�
8����R�\�.��6�6�6��5s�A�A	�A	c��f�K�d����2��}|�d��}��t��5}|�d{V��ddd��n#1swxYwY��|jjt����|jjjd��dS)Nc�.K�|3d{V��\}}dWV��6dSrIrr{s   rrz`CoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_gen.<locals>.<genexpr>�s;����2�2�2�2�2�2�2�t�q�!�1�2�2�2�2�2�2�2�2rr�rbr�)rgr�r;r�rs   ��rr"zMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_gen�s������2�2�x�x�z�z�2�2�2�C��	�	�$���A��"�"�<�0�0�
�B���������
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��!�!�"�,�"8�:L�M�M�M����R�\�3�8�%�@�@�@��5s�	A�A �#A r9)rr�r�r"r�r�s`   @@r�.test_for_assign_raising_stop_async_iteration_2z<CoroutineTest.test_for_assign_raising_stop_async_iteration_2ss$�����	-�	-�	-�	-�	-�	-�	-�	-�	 �	 �	 �	 �	 �	�	�	�	�	�	�	
����7�7�9�9�-�-��E�{�;�;�;�	�	�	�	�	�	�
	
����8�8�:�:�.�.��U��<�<�<�	�	�	�	�	�	�	
����7�7�9�9�-�-��E�{�;�;�;�;�;rc��	d�}|�t��5|��j}ddd��n#1swxYwY|���dS)Nc��
K�dSrrrrrr|z)CoroutineTest.test_bpo_45813_1.<locals>.f�r�r��assertWarnsr��cr_frame�clear)rr|�frames   r�test_bpo_45813_1zCoroutineTest.test_bpo_45813_1�s���4�	�	�	�
�
�
�n�
-�
-�	!�	!��A�C�C�L�E�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�
���
�
�
�
�
s
�;�?�?c��	d�}|��}|�t��5|j���ddd��dS#1swxYwYdS)Nc��
K�dSrrrrrr|z)CoroutineTest.test_bpo_45813_2.<locals>.f�r�rr�rns   r�test_bpo_45813_2zCoroutineTest.test_bpo_45813_2�s���4�	�	�	��a�c�c��
�
�
�n�
-�
-�	!�	!��L��� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A�A�Ac������fd�}�fd��tjd����|��}|�d��}|�t��}|�||��dS)Nc��(�K�����d{V��Srrrhs�rr�z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.a�����������9�9�9�9�9�9�rc��(�K�����d{V��Srrr�s�rrz6CoroutineTest.test_stack_in_coroutine_throw.<locals>.b�rrc3�K�	ttj����V�dS#t$r&ttj����V�YdSwxYwr)r��	traceback�
extract_stackr�rrrr�z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.c�so����
5��)�1�3�3�4�4�4�4�4�4�4��$�
5�
5�
5��)�1�3�3�4�4�4�4�4�4�4�4�
5���s�"(�,A�A)rsr�r&r�r�r\)rr�r)�len_send�	len_throwrr�s     @@r�test_stack_in_coroutine_throwz+CoroutineTest.test_stack_in_coroutine_throw�s�����	�	�	�	�	�	�	�	�	�	�
��	5�	5�
��	5��q�s�s���9�9�T�?�?���J�J�0�1�1�	�����9�-�-�-�-�-rN)Vrrrrjr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrr"r(r,r/r3r:rFrOrUr\rlrrr{r�r�r�r�r�r�r�r�r�r�r�rrrr)r1r<rDrnrzr�r�r�r�r�r�r�r�r�rr&r5rJrRrZrbrgrorvr�r�r�r�r�r�r�r�rrrrrdrd
s ������4�4�4�M�M�M�"���������:/�/�/�0
�
�
���� 
�
�
�!�!�!�,!!�!!�!!�F������
�
�
�
�
�
�,�,�,�"+�+�+�>���.&�&�&�P%�%�%�<.�.�.�.�.�.�+�+�+�<���������G�G�G�5�5�5����9�9�9�	8�	8�	8�	�	�	�7�7�7�,
5�
5�
5�
C�
C�
C����$��� '� '� '�D$�$�$�$
.�
.�
.�&�&�&�P,�,�,� ,�,�,� 
,�
,�
,����&���&K�K�K�4=!�=!�=!�@!�!�!�(D�D�D�4E�E�E�,���$!�!�!�*F3�F3�F3�P
<�
<�
<�>�>�>�(>�>�>�.Z&�Z&�Z&�x!�!�!�!�!�!�$@�@�@�('�'�'�.'�'�'�.F�F�F�*���@���<���<#�#�#�<
�
�
� � � �
"�
"�
"����
�
�
�&�&�&�4H�4H�4H�l���
�
�
�
D�
D�
D�<�<�<�B<�<�<�@���!�!�!�.�.�.�.�.rrdz0asyncio does not work under Emscripten/WASI yet.c��eZdZd�ZdS)�CoroAsyncIOCompatTestc������tjd���Gd�dt���g�G��fd�d�������fd�}����}��|��	|�|����n#�$rYnwxYw|�����d��n.#|�����d��wxYw|��gd���dS)N�asyncioc��eZdZdS)�9CoroAsyncIOCompatTest.test_asyncio_1.<locals>.MyExceptionNrYrrr�MyExceptionr
�rZrrc�(��eZdZ��fd�Z��fd�ZdS)�0CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CMc���K���d����d���d{V����d��|S)Nr0�{�G�z�?r/)r%�sleep)rrr*s ��rr�z;CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aenter__�sT������
�
�a� � � ��m�m�D�)�)�)�)�)�)�)�)�)��
�
�a� � � ��rc��v�K���d���d{V����|j��dS)Nr)rr%r)r�exc_type�exc_val�exc_tbrr*s    ��rr�z:CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aexit__�sF������m�m�D�)�)�)�)�)�)�)�)�)��
�
�h�/�0�0�0�0�0rNr�)rr*s��rr�r�sQ�������
�
�
�
�
�
�
1�
1�
1�
1�
1�
1�
1�
1rr�c���K����4�d{V��}��d���d{V����#1�d{V��swxYwY��d��dS)Nr�unreachable)rr%)r�r�rrr*s ����rr|z/CoroAsyncIOCompatTest.test_asyncio_1.<locals>.f�s�������r�t�t�
"�
"�
"�
"�
"�
"�
"�q��m�m�D�)�)�)�)�)�)�)�)�)�!�!�
"�
"�
"�
"�
"�
"�
"�
"�
"�
"����
"�
"�
"�
"�
�M�M�-�(�(�(�(�(s�2�
<�<)r0r/r)	r�
import_moduler��new_event_loop�set_event_loop�run_until_completer��set_event_loop_policyr\)rr|�loopr�rrr*s   @@@@r�test_asyncio_1z$CoroAsyncIOCompatTest.test_asyncio_1�s������� �-�i�8�8��	�	�	�	�	�)�	�	�	���		1�		1�		1�		1�		1�		1�		1�		1�		1�		1�		1�	)�	)�	)�	)�	)�	)�	)�	)��%�%�'�'�����t�$�$�$�	0��#�#�A�A�C�C�(�(�(�(���	�	�	��D�	����
�J�J�L�L�L��)�)�$�/�/�/�/��
�J�J�L�L�L��)�)�$�/�/�/�/��������!6�!6�!6�7�7�7�7�7s*�0B�
C�B�C�B�C�+C.N)rrrr rrrr	r	�s#������%8�%8�%8�%8�%8rr	c�&�eZdZd�Zd�Zd�Zd�ZdS)�OriginTrackingTestc�r�tjtj��j��}|j|jfSr)r^�getframeinfo�currentframe�f_back�filename�lineno)r�infos  r�herezOriginTrackingTest.here�s-���#�G�$8�$:�$:�$A�B�B���
�t�{�+�+rc�<���tj��}	d��tjd����tj��d��t	j�����5}��|j��ddd��n#1swxYwYtjd����tj��d������\}}t	j�����5}��|j||dzdff��ddd��n#1swxYwYtjd����tj��d����fd�}����\}}|��\\}}}t	j|��5��|j||df||dzdff��ddd��n#1swxYwYtjd��t	j�����5}��	dt|j��cxkodknc��ddd��n#1swxYwY��t��5tjd	��ddd��n#1swxYwY��tj��d��tj|��dS#tj|��wxYw)
Nc��
K�dSrrrrr�corofnz7OriginTrackingTest.test_origin_tracking.<locals>.corofn�r�rrr0�test_origin_trackingr/c�@���������fSr)r*)r-rs��r�nestedz7OriginTrackingTest.test_origin_tracking.<locals>.nested	s����	�	���V�V�X�X�.�.rr0rg���)
rw�#get_coroutine_origin_tracking_depth�#set_coroutine_origin_tracking_depthr\�
contextlib�closingr�	cr_originr*r]r�rEr�)	r�
orig_depthr)�fnamer(r0�nested_fname�
nested_linenor-s	`       @rr.z'OriginTrackingTest.test_origin_tracking�s������<�>�>�
�*	@�
�
�
�
�3�A�6�6�6����S�D�F�F��J�J�J��#�F�F�H�H�-�-�
2���!�!�$�.�1�1�1�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2����
2�
2�
2�
2�
�3�A�6�6�6����S�D�F�F��J�J�J� �I�I�K�K�M�E�6��#�F�F�H�H�-�-�
Q��� � ���#(�&�1�*�6L�"M�!O�Q�Q�Q�
Q�
Q�
Q�
Q�
Q�
Q�
Q�
Q�
Q�
Q�
Q����
Q�
Q�
Q�
Q�
�3�A�6�6�6����S�D�F�F��J�J�J�
/�
/�
/�
/�
/�
/� �I�I�K�K�M�E�6�4:�F�H�H�1�
*�l�M�D��#�D�)�)�
P�
P�� � ���#/���"I�#(�&�1�*�6L�"M�"O�P�P�P�
P�
P�
P�
P�
P�
P�
P�
P�
P�
P�
P����
P�
P�
P�
P�
�3�D�9�9�9��#�F�F�H�H�-�-�
@������C���$7�$7� >� >� >� >�$� >� >� >� >�?�?�?�
@�
@�
@�
@�
@�
@�
@�
@�
@�
@�
@����
@�
@�
@�
@��"�"�:�.�.�
<�
<��7��;�;�;�
<�
<�
<�
<�
<�
<�
<�
<�
<�
<�
<����
<�
<�
<�
<�
���S�D�F�F��M�M�M�
�3�J�?�?�?�?�?��C�3�J�?�?�?�?���s��AL�1B�L�B�L�B� A1L�#E�4L�E�L�E�A?L�'G:�.L�:G>�>L�G>�3L�56I7�+L�7I;�;L�>I;�?L�J=�1L�=K�L�K�*L�Lc�.���	�
�d��
����\}}�
fd��|dz
}����\}}�fd��	|dz
}�	�fd�}tj��}	|dd�
j�d���}|d	d
�d�
j�d�dd
|�d|�d�dg����|dd
�d�
j�d�dd
|�d|�d�dd
|�d|�d�dg����tj|��dS#tj|��wxYw)Nc��
K�dSrrrrrr-z?OriginTrackingTest.test_origin_tracking_warning.<locals>.corofn	r�rc������Srr)r-s�r�a1z;OriginTrackingTest.test_origin_tracking_warning.<locals>.a1!	s����6�8�8�Orr/c������Srr)r>s�r�a2z;OriginTrackingTest.test_origin_tracking_warning.<locals>.a2&	s����2�4�4�Krc���tj|����t��5}���t	j��ddd��n#1swxYwY��|t|j����dSr)	rwr3r�r�rr:r\r��warning)�depth�msgr;r@rs   ��rr�z>OriginTrackingTest.test_origin_tracking_warning.<locals>.check*	s�����3�E�:�:�:��!�!�.�1�1�
%�R�������"�$�$�$�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%����
%�
%�
%�
%�
���S�#�b�j�/�/�2�2�2�2�2s�A�A�!Arzcoroutine 'z' was never awaitedr0r�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*rwr2rr[r3)r�a1_filename�	a1_lineno�a2_filename�	a2_linenor�r7rDr>r@r-s`       @@@r�test_origin_tracking_warningz/OriginTrackingTest.test_origin_tracking_warning	s�������	�	�	�"&�������Y�	�	�	�	�	��Q��	�!%�������Y�	�	�	�	�	��Q��	�	3�	3�	3�	3�	3�	3��<�>�>�
�	@��%��Q��)<�Q�Q�Q�R�R�C��E�!�R�W�W�H�f�1�H�H�H�@�D�;�D�D�	�D�D�D�7�	���
�
�
�
�E�!�R�W�W�H�f�1�H�H�H�@�D�;�D�D�	�D�D�D�5�D�;�D�D�	�D�D�D�7�
���
�
�
�
�3�J�?�?�?�?�?��C�3�J�?�?�?�?���s
�$BC>�>Dc���d�}tj}	d�t_tj��5}t	jdtf��5|��}t|��}~tj��|�	t|j
j��|��|�	|j
jt��ddd��n#1swxYwYddd��n#1swxYwYt`t	jdtf��5|��tj��ddd��n#1swxYwY|t_dS#|t_wxYw)Nc��
K�dSrrrrrr-zLOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.corofnJ	r�rc��ddzSr�rr�s rr�zNOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.<lambda>O	s
��a��c�rzcoroutine .* was never awaited)r7�_warn_unawaited_coroutinerr�r�check_warningsr�r�r:r\r�r�rr�)rr-�orig_wucr;r)r�s      r�)test_unawaited_warning_when_module_brokenz<OriginTrackingTest.test_unawaited_warning_when_module_brokenF	sC��	�	�	��5��	:�1A�1A�H�.��3�5�5�

L�� �/�;�(�*�+�+�

L�

L�
�v�x�x�� ��J�J�	���"�$�$�$�� � ��b�m�&:�!;�!;�Y�G�G�G�� � ���!7�9J�K�K�K�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L����

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L�

L����

L�

L�

L�

L��2� �/�6��G�I�I�
%�
%�������"�$�$�$�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%����
%�
%�
%�
%�2:�H�.�.�.���H�.�9�9�9�9sw� E �C0�
BC�
C0�C	�C0� C	�!C0�$E �0C4�4E �7C4�8%E �E�;E �E�E �E�E � E.N)rrrr*r.rIrPrrrr"r"�sX������,�,�,�,@�,@�,@�\(@�(@�(@�T :� :� :� :� :rr"c��eZdZd�ZdS)�"UnawaitedWarningDuringShutdownTestc�r�d}td|��d}td|��d}td|��dS)Nz7import asyncio
async def f(): pass
asyncio.gather(f())
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)rr@s  r�&test_unawaited_warning_during_shutdownzIUnawaitedWarningDuringShutdownTest.test_unawaited_warning_during_shutdownk	sS��(��	��t�$�$�$�#��	��t�$�$�$�8��	��t�$�$�$�$�$rN)rrrrTrrrrRrRi	s#������%�%�%�%�%rrRc� �eZdZd�Zd�Zd�ZdS)�CAPITestc���ddlm��fd�}|�|���d��d��dS)Nr��	awaitTypec��J�K��tdg����}|�d{V��Sr�rM��future�ats �rrXz%CAPITest.test_tp_await_1.<locals>.foo�	s.������R��a�S�	�	�]�]�F� �L�L�L�L�L�L�!rr0)�	_testcapirYr\r&�rrXr]s  @r�test_tp_await_1zCAPITest.test_tp_await_1�	s^���-�-�-�-�-�-�	"�	"�	"�	"�	"�	
���������D�)�)�1�-�-�-�-�-rc��ddlm}|tdg����}|�t	|�����d��dS)NrrXr0)r^rYr�r\r1r)rr]r\s   r�test_tp_await_2zCAPITest.test_tp_await_2�	sY��-�-�-�-�-�-���D�!��I�I��������f�.�.�0�0�1�1�1�5�5�5�5�5rc����ddlm��fd�}|�td��5|�|���d��d��ddd��dS#1swxYwYdS)NrrXc��.�K��d��}|�d{V��Sr�rr[s �rrXz%CAPITest.test_tp_await_3.<locals>.foo�	s&������R��U�U�F� �L�L�L�L�L�L�!rz.__await__.*returned non-iterator of type 'int'r0)r^rYr�r�r\r&r_s  @r�test_tp_await_3zCAPITest.test_tp_await_3�	s����-�-�-�-�-�-�	"�	"�	"�	"�	"��
#�
#��K�M�M�	2�	2����S�S�U�U�Z�Z��-�-�q�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	2�	2s�2A'�'A+�.A+N)rrrr`rbrerrrrVrV}	sA������.�.�.�6�6�6�	2�	2�	2�	2�	2rrV�__main__)%r4r�r^r�rwrsr�unittestr7�testr�test.supportrr�test.support.script_helperrr	rr#r-r4�contextmanagerr;�TestCaser=rSrd�skipIf�
is_emscripten�is_wasir	r"rR�cpython_onlyrVrr�rrr�<module>rqs��������������
�
�
�
�
�
�
�
�����������������������&�&�&�&�&�&�(�(�(�(�(�(�7�7�7�7�7�7��������������������������&�������b0�b0�b0�b0�b0��*�b0�b0�b0�J
@�@�@�@�@��)�@�@�@�,n.�n.�n.�n.�n.�H�%�n.�n.�n.�b5�����,�W�_�6���'8�'8�'8�'8�'8�H�-�'8�'8�	��'8�T}:�}:�}:�}:�}:��*�}:�}:�}:�@%�%�%�%�%��):�%�%�%�(	��2�2�2�2�2�x� �2�2���2�:�Z����H�M�O�O�O�O�O��r