Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_coroutines.cpython-310.pyc
o

�9j*��@sNddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlmZGdd�d�ZGdd	�d	�Zd
d�Zdd
�Zejdd��ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�Ze
jGdd�dej��Zedkr�e� �dSdS)�N)�support)�
import_helper)�warnings_helper��assert_python_okc@�eZdZdd�Zdd�ZdS)�AsyncYieldFromcC�
||_dS�N��obj)�selfr�r�+/usr/lib/python3.10/test/test_coroutines.py�__init__�
zAsyncYieldFrom.__init__ccs�|jEdHdSr
r�r
rrr�	__await__��zAsyncYieldFrom.__await__N��__name__�
__module__�__qualname__rrrrrrr�rc@r)�
AsyncYieldcCr	r
��value)r
rrrrrrzAsyncYield.__init__ccs�|jVdSr
rrrrrr��zAsyncYield.__await__Nrrrrrrrrc
Csv|jtjtjhvsJ�g}d}	z
|�|�d��Wnty9}z|jr*|jdnd}WYd}~||fSd}~wwq)NTr)�	__class__�types�
GeneratorType�
CoroutineType�append�send�
StopIteration�args)�coro�buffer�result�exrrr�	run_async s
���r*c
Cs�|jtjusJ�|��}g}d}d}	z|dr |�t|��n|�|�d��|d7}WntyL}z|jr=|jdnd}WYd}~||fSd}~wwq)NrT��)	rrr!rr"�nextr#r$r%)r&�awr'r(�ir)rrr�run_async__await__.s$
���r0ccsH�t���t�d�dVt��Wd�dS1swYdS)N�ignore)�warnings�catch_warnings�simplefilterr�
gc_collectrrrr�silence_coro_gcAs�


"�r6c@�,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�AsyncBadSyntaxTestc
C�xgd�}|D]3}|j|d��#|�t��t|dd�Wd�n1s%wYWd�n1s4wYqdS)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]
            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]
            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;rrr�test_badsyntax_1Ks6����z#AsyncBadSyntaxTest.test_badsyntax_1c
Cr9)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:r<r=r>rCrrr�test_badsyntax_2�s"����z#AsyncBadSyntaxTest.test_badsyntax_2cCs<|�t��tddd�Wd�dS1swYdS)Nz	async = 1r<r=)r@rArBrrrr�test_badsyntax_3�s"�z#AsyncBadSyntaxTest.test_badsyntax_3c
Cr9)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:r<r=r>rCrrr�test_badsyntax_4�s-����z#AsyncBadSyntaxTest.test_badsyntax_4N)rrrrErFrGrHrrrrr8Is;'r8c@�eZdZdd�ZdS)�TokenizerRegrTestcCs�g}td�D]}|�dj|d��qd�|�}i}t|||�|�|d�d�|d7}i}t|||�|�|d�d�|�t�|d��dS)	Ni�zdef i{i}(): return {i}�r/�
�i499i�z
async def foo():
    return�foo)	�ranger"�format�joinr=�assertEqual�
assertTrue�inspect�iscoroutinefunction)r
�bufr/�nsrrr�test_oneline_defs�s
z#TokenizerRegrTest.test_oneline_defsN)rrrrXrrrrrJ��rJc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dSdT�Z,dUdV�Z-dWdX�Z.dYdZ�Z/d[d\�Z0d]d^�Z1d_d`�Z2dadb�Z3dcdd�Z4dedf�Z5dgdh�Z6didj�Z7dkdl�Z8dmdn�Z9dodp�Z:dqdr�Z;dsdt�Z<dudv�Z=dwdx�Z>dydz�Z?d{d|�Z@d}d~�ZAdd��ZBd�d��ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�S)��
CoroutineTestcCsdd�}|�t|d��dS)Ncs��dVdSr
rrrrr�gen�s�
z%CoroutineTest.test_gen_1.<locals>.genr)�assertFalse�hasattr)r
r\rrr�
test_gen_1�szCoroutineTest.test_gen_1cCs�dd�}|�}|�|tj�|�t|jjtj@��|�	t|jjtj
@��|�t|jjtj@��|�	t|jjtj
@��|�t
|�gdf�|�t|��gdf�dd�}|�	t|jjtj@��dS)Nc���dS�N�
rrrrrrN���z&CoroutineTest.test_func_1.<locals>.foorbcS�dSr
rrrrr�bar�z&CoroutineTest.test_func_1.<locals>.bar)�assertIsInstancerr!rS�bool�__code__�co_flagsrT�CO_COROUTINEr]�CO_GENERATOR�cr_coderRr*r0)r
rN�frerrr�test_func_1�szCoroutineTest.test_func_1cC�Ddd�}|�td��t|��Wd�dS1swYdS)Nc���t�r
�r$rrrrrNrcz&CoroutineTest.test_func_2.<locals>.foozcoroutine raised StopIteration)�assertRaisesRegex�RuntimeErrorr*�r
rNrrr�test_func_2s�"�zCoroutineTest.test_func_2cCs*dd�}|�}|�t|�d�|��dS)Nc�rqr
rrrrrrrNrcz&CoroutineTest.test_func_3.<locals>.fooz^<coroutine object.* at 0x.*>$)�assertRegex�repr�close)r
rNr&rrr�test_func_3szCoroutineTest.test_func_3csBdd�}|�}�fdd�}|��t|�Wd�n1swY|��t|�Wd�n1s6wY|��t|�Wd�n1sMwY|��t|�Wd�n1sdwY|��
|D]}qoWd�n1s|wY|��dd�|D�Wd�n1s�wY|��dS)Nc�rqr
rrrrrrrN!rcz&CoroutineTest.test_func_4.<locals>.fooc���td�S�Nz"'coroutine' object is not iterable�rs�	TypeErrorrrrr�<lambda>%��z+CoroutineTest.test_func_4.<locals>.<lambda>cS�g|]}|�qSrr��.0r/rrr�
<listcomp>9�z-CoroutineTest.test_func_4.<locals>.<listcomp>)�list�tuple�sum�iterry)r
rNr&�checkr/rrr�test_func_4 s0
�
�
�
����zCoroutineTest.test_func_4cs�tjdd����fdd�}�fdd�}|�}|��
|D]}qWd�n1s)wY|����D]}��|d�q5��dd	���D�dg���t���d
���tt����d�dS)Ncss�dVdS�Nr,rrrrrre>��
z&CoroutineTest.test_func_5.<locals>.barc�����IdHdSr
rr�rerrrNBrz&CoroutineTest.test_func_5.<locals>.foocr{r|r}rrrrrEr�z+CoroutineTest.test_func_5.<locals>.<lambda>r,cSr�rr)r��elrrrr�Qr�z-CoroutineTest.test_func_5.<locals>.<listcomp>�r,)r�	coroutineryrRr�r-r�)r
rNr�r&r�r)rer
r�test_func_5=s 
��
zCoroutineTest.test_func_5cs~tjdd����fdd�}|�}|�|�d�d�|�|�d�d�|�t��|�d�Wd�dS1s8wYdS)Ncss�dVdVdS�Nr,r+rrrrrreVs�
z&CoroutineTest.test_func_6.<locals>.barc�r�r
rrr�rrrN[rz&CoroutineTest.test_func_6.<locals>.foor,r+)rr�rRr#r@r$)r
rNrnrr�r�test_func_6Us
"�zCoroutineTest.test_func_6cs\dd�}|���fdd�}|�td��
t|��Wd�n1s#wY���dS)Nc�r`rarrrrrreercz&CoroutineTest.test_func_7.<locals>.barc3s��EdHdSr
rr�r&rrrNi��z&CoroutineTest.test_func_7.<locals>.foozCcannot 'yield from' a coroutine object in a non-coroutine generator)rsr~r�ry�r
rerNrr�r�test_func_7ds��zCoroutineTest.test_func_7csBtj�fdd��}dd�}|��|�t|��gdf����dS)Nc3s��EdHSr
rrr�rrreur�z&CoroutineTest.test_func_8.<locals>.barc�r`�N�spamrrrrrrNyrcz&CoroutineTest.test_func_8.<locals>.foor�)rr�rRr*ryr�rr�r�test_func_8tszCoroutineTest.test_func_8c	Cs�dd�}|�td��|�t��Wd�n1swY|�td��(|�t��|�D]}q1Wd�n1s>wYt��Wd�dS1sRwYdS)Nc���dSr
rrrrrrN�rcz&CoroutineTest.test_func_9.<locals>.fooz0coroutine '.*test_func_9.*foo' was never awaited)�assertWarnsRegex�RuntimeWarningrr5r@r~)r
rN�_rrr�test_func_9�s&�
��
��
"�zCoroutineTest.test_func_9cs�d�tj�fdd����fdd�}|�}|��}|�|t|��t|�|�|�d�d�|��d�|��|��d�|�}|��}t|�|�	t
��|�t
dd�Wd�n1s_wY|��d	�dS)
Nrc3sJ�zz
dV}|dVWnty�d7��wW�d7�dS�d7�w)Nr+�dr,��ZeroDivisionError��a)�Nrrr\�s���z'CoroutineTest.test_func_10.<locals>.genc�r�r
rr�r\rrrN�rz'CoroutineTest.test_func_10.<locals>.foorbr�r,�f)rr�r�assertIsr�r-rRr#ryr@r��throw)r
rNr&r.r)r�r\r�test_func_10�s&�zCoroutineTest.test_func_10cCsRdd�}|�}|�dt|��|�dt|����|�dt|����|��dS)Nc�r�r
rrrrr�func���z(CoroutineTest.test_func_11.<locals>.funcr�__iter__�coroutine_wrapper)�assertIn�dirrrxry)r
r�r&rrr�test_func_11�szCoroutineTest.test_func_11csN�fdd�}|��|�td����d�Wd�dS1s wYdS)Nc�s���d�}tIdHdSr
)r#rNrK��merr�g�s�
z%CoroutineTest.test_func_12.<locals>.gzcoroutine already executing)rs�
ValueErrorr#)r
r�rr�r�test_func_12�s�"�zCoroutineTest.test_func_12cCsPdd�}|�}|�td��
|�d�Wd�n1swY|��dS)Nc�r�r
rrrrrr��rcz%CoroutineTest.test_func_13.<locals>.gz5can't send non-None value to a just-started coroutiner�)rsr~r#ry)r
r�r&rrr�test_func_13�s��zCoroutineTest.test_func_13csdtjdd����fdd�}|�}|�d�|�td��
|��Wd�dS1s+wYdS)Ncsr[r
rrrrrr\�r�z'CoroutineTest.test_func_14.<locals>.genc�s6�z	��IdHWdSty��IdHYdSwr
��
GeneratorExitrr�rrr&�s��z(CoroutineTest.test_func_14.<locals>.corozcoroutine ignored GeneratorExit)rr�r#rsrtry)r
r&�crr�r�test_func_14�s

�
"�zCoroutineTest.test_func_14cCs�dd�}dd�}|�}|�td��||��d�Wd�n1s#wY|�td��||��d�Wd�dS1sAwYdS)Nc�r`r�rrrrr�spammer�rcz+CoroutineTest.test_func_15.<locals>.spammerc�s�|IdHSr
rr�rrr�reader���
z*CoroutineTest.test_func_15.<locals>.readerr��&cannot reuse already awaited coroutine)rsr$r#rt)r
r�r��spammer_cororrr�test_func_15�s��"�zCoroutineTest.test_func_15cs
tjdd����fdd�}�fdd�}|�}||�}|�d�|�d�|�td��|�td��Wd�n1s<wY||�}|�d�|�td��
|�d�Wd�n1s`wY|�td��|�td	��Wd�dS1s~wYdS)
Ncsr[r
rrrrr�nop�r�z'CoroutineTest.test_func_16.<locals>.nopc�s���IdHdSr�rr�r�rrr#�s�z(CoroutineTest.test_func_16.<locals>.sendc�s���IdH|IdHSr
rr�r�rr�reads�
z(CoroutineTest.test_func_16.<locals>.read�hamr��wat)rr�r#rs�	Exceptionr�rt)r
r#r�r�r�rr�r�test_func_16�s.


�
���"�zCoroutineTest.test_func_16cCs�dd�}|�}|�td��
|�d�Wd�n1swY|�td��
|�d�Wd�n1s8wY|�td��|�td��Wd�n1sUwY|��|��dS)Nc�r`r�rrrrrr�rcz-CoroutineTest.test_func_17.<locals>.coroutiner�r�r�)rsr$r#rtr�r�ry)r
r�r&rrr�test_func_17s"�����zCoroutineTest.test_func_17cCsFdd�}|�}|��}t|�}|�td��
|�d�Wd�n1s%wY|�td��
|�d�Wd�n1s@wY|�td��t|�Wd�n1sZwY|�td��|�td��Wd�n1swwY|�td��|�td��Wd�n1s�wY|�	�|�	�dS)Nc�r`r�rrrrrr�1rcz-CoroutineTest.test_func_18.<locals>.coroutiner�r�r�)
rr�rsr$r#rtr-r�r�ry)r
r�r&�
await_iter�itrrr�test_func_18.s:����
�
����zCoroutineTest.test_func_18cs�d�tj�fdd����fdd�}|�}|�d�|�d�|��d�|��|��d�td�D]}|��|��d�q2dS)Nrc3s2�dVzdVWdSty�d7�YdSwr�r�r)�CHKrrrNYs��z'CoroutineTest.test_func_19.<locals>.fooc�r�r
rr)rNrrr�brz-CoroutineTest.test_func_19.<locals>.coroutiner,�)rr�r#rRryrO)r
r�r&r�r)r�rNr�test_func_19Vs

�zCoroutineTest.test_func_19cCs&dd�}t|��}|�|gdf�dS)Nc�r`)N�rbrrrrrrNurcz7CoroutineTest.test_coro_wrapper_send_tuple.<locals>.foor�)r0rR�r
rNr(rrr�test_coro_wrapper_send_tuplets
z*CoroutineTest.test_coro_wrapper_send_tuplecCs8dd�}t|��}|�|dt�|�|djd�dS)Nc�s
�td�SrarrrrrrrN|s�z?CoroutineTest.test_coro_wrapper_send_stop_iterator.<locals>.foor,rb)r0rgr$rRrr�rrr�$test_coro_wrapper_send_stop_iterator{s
z2CoroutineTest.test_coro_wrapper_send_stop_iteratorcs�tj��fdd����fdd�����fdd�}|����t���tj����j���d���t���tj	����jjj
jd���t
��
��d�Wd�n1sYwY��t���tj����j�dS)Nc3sL���t���tj����j�dV��t���tj����j�dSr
)rRrT�getcoroutinestate�CORO_RUNNING�assertIsNone�cr_awaitr)�coro_br
rrr��s�z&CoroutineTest.test_cr_await.<locals>.ac�r�r
rrr�rrr��rz&CoroutineTest.test_cr_await.<locals>.cc�s*����j���IdH���j�dSr
)r�r�r)r�r�r
rr�b�s�z&CoroutineTest.test_cr_await.<locals>.br�)rr�rRrTr��CORO_CREATEDr�r�r#�CORO_SUSPENDED�gi_code�co_namer@r$�CORO_CLOSED)r
r�r)r�r�r�r
r�
test_cr_await�s
�zCoroutineTest.test_cr_awaitcCs�tj}|�d|jj�|�d|jj�|�d|jj�|�d|jdj�|�d|jdj�|�|j	d�dd	�}|�}|�d
t
|��|��dS)Nzinto coroutinezinside coroutinezin coroutinezof the coroutinerrr�c�r�r
rrrrrrn�r�z(CoroutineTest.test_corotype_1.<locals>.fzcoroutine object)rr!r�r#�__doc__ryr��__dict__rRrrx)r
�ctrnr�rrr�test_corotype_1�szCoroutineTest.test_corotype_1cCrp)Nc�s�dIdHdSr�rrrrrrN�r�z'CoroutineTest.test_await_1.<locals>.foozobject int can.t.*await�rsr~r*rurrr�test_await_1�s"�zCoroutineTest.test_await_1cCrp)Nc�s�gIdHdSr
rrrrrrN�r�z'CoroutineTest.test_await_2.<locals>.foozobject list can.t.*awaitr�rurrr�test_await_2�s"�zCoroutineTest.test_await_2cCs@dd�}|�t|��gd�df�|�t|��gd�df�dS)Nc�s�tgd��IdHdS)N�r,r+r�)rrrrrrN���z'CoroutineTest.test_await_3.<locals>.foor�)rRr*r0rurrr�test_await_3�szCoroutineTest.test_await_3cs.dd���fdd�}|�t|��gdf�dS)Nc�r`�N�*rrrrrre�rcz'CoroutineTest.test_await_4.<locals>.barc�����IdHSr
rrr�rrrN�rz'CoroutineTest.test_await_4.<locals>.foor��rRr*rurr�r�test_await_4�szCoroutineTest.test_await_4c�VGdd�d���fdd�}|�td��t|��Wd�dS1s$wYdS)Nc@rI)z-CoroutineTest.test_await_5.<locals>.AwaitablecSrdr
rrrrrr��z7CoroutineTest.test_await_5.<locals>.Awaitable.__await__N�rrrrrrrr�	Awaitable��r�c�r�r
rr�r�rrrN�rz'CoroutineTest.test_await_5.<locals>.foo�(__await__.*returned non-iterator of typer�rurr�r�test_await_5���"�zCoroutineTest.test_await_5cs6Gdd�d���fdd�}|�t|��dgdf�dS)Nc@rI)z-CoroutineTest.test_await_6.<locals>.AwaitablecSs
tdg�S)N�4�r�rrrrr�rz7CoroutineTest.test_await_6.<locals>.Awaitable.__await__Nr�rrrrr��r�r�c�r�r
rrr�rrrN�rz'CoroutineTest.test_await_6.<locals>.foor�r�rurr�r�test_await_6�szCoroutineTest.test_await_6cs6Gdd�d���fdd�}|�t|��dgdf�dS)Nc@rI)z-CoroutineTest.test_await_7.<locals>.Awaitablecss�dVdS)Nr�r�rrrrrr�s�z7CoroutineTest.test_await_7.<locals>.Awaitable.__await__Nr�rrrrr��r�r�c�r�r
rrr�rrrN�rz'CoroutineTest.test_await_7.<locals>.foor�r�r�rurr�r�test_await_7�szCoroutineTest.test_await_7cr�)Nc@�eZdZdS)z-CoroutineTest.test_await_8.<locals>.AwaitableN�rrrrrrrr���r�c�r�r
rrr�rrrN�s�z'CoroutineTest.test_await_8.<locals>.fooz4object Awaitable can't be used in 'await' expressionr�rurr�r�test_await_8�s�"�zCoroutineTest.test_await_8cs^�fdd��dd����fdd�}�fdd�}|�t|��gd	f�|�t|��gd
f�dS)Nc��Sr
rrr�rr�wrap�r�z(CoroutineTest.test_await_9.<locals>.wrapc�r`r�rrrrrre�rcz'CoroutineTest.test_await_9.<locals>.barc�sr�d�fdd�i}G�fdd�d�}��IdH���IdH|d���IdH��IdHd|���IdHS)Nr�crr
rr�rrrrrfz9CoroutineTest.test_await_9.<locals>.foo.<locals>.<lambda>cseZdZ�ZdS)z3CoroutineTest.test_await_9.<locals>.foo.<locals>.DBN)rrrr�rrrr�DBsr���r�)�dbr�rerrrrNs�,��z'CoroutineTest.test_await_9.<locals>.fooc�s���IdHSr
rrr�rr�foo2	r�z(CoroutineTest.test_await_9.<locals>.foo2i��i���r��r
rNr
rr	r�test_await_9�s	zCoroutineTest.test_await_9cs:dd���fdd���fdd�}|�t|��gdf�dS)Nc�r`r�rrrrr�bazrcz(CoroutineTest.test_await_10.<locals>.bazc�s���Sr
rr)r
rrre��z(CoroutineTest.test_await_10.<locals>.barc�s���IdHIdHSr
rrr�rrrN��z(CoroutineTest.test_await_10.<locals>.foor�r�rur)rer
r�
test_await_10szCoroutineTest.test_await_10csDdd��dd����fdd�}�fdd�}|�t|��gd	f�dS)
NcS�|Sr
r��valrrr�identr�z*CoroutineTest.test_await_11.<locals>.identc�r`r�rrrrrrercz(CoroutineTest.test_await_11.<locals>.barc�s����IdHd�S)Nrrr�rerrrrN"rz(CoroutineTest.test_await_11.<locals>.fooc�s���IdHdfS)Nr�rrr�rrr
%rz)CoroutineTest.test_await_11.<locals>.foo2)r�r�r�rrrr�
test_await_11s
zCoroutineTest.test_await_11csndd�}|��G�fdd�d���fdd�}|�td��
t|��Wd�n1s,wY���dS)Nc�r`r�rrrrrr&+rcz)CoroutineTest.test_await_12.<locals>.corocseZdZ�fdd�ZdS)z.CoroutineTest.test_await_12.<locals>.Awaitablecrr
rr�r�rrr0r�z8CoroutineTest.test_await_12.<locals>.Awaitable.__await__Nr�rrrrr�/sr�c�r�r
rrr�rrrN3rz(CoroutineTest.test_await_12.<locals>.fooz"__await__\(\) returned a coroutine)rsr~r*ry)r
r&rNr)r�r�r�
test_await_12*s��zCoroutineTest.test_await_12cr�)Nc@rI)z.CoroutineTest.test_await_13.<locals>.AwaitablecSrr
rrrrrr>r�z8CoroutineTest.test_await_13.<locals>.Awaitable.__await__Nr�rrrrr�=r�r�c�r�r
rrr�rrrNArz(CoroutineTest.test_await_13.<locals>.foor�r�rurr�r�
test_await_13<r�zCoroutineTest.test_await_13cs�Gdd�d��Gdd�d��Gdd�dt����fdd����fd	d
�}|�}|�d�|�td��
|�d�Wd�n1sBwY|�}|�d�|����|�t�Wd�dS1sewYdS)Nc@r)z,CoroutineTest.test_await_14.<locals>.WrappercSs|jtjusJ�||_dSr
)rrr!r&)r
r&rrrrLs
z5CoroutineTest.test_await_14.<locals>.Wrapper.__init__cSs
|j��Sr
)r&rrrrrrOrz6CoroutineTest.test_await_14.<locals>.Wrapper.__await__Nrrrrr�WrapperJsrc@rI)z/CoroutineTest.test_await_14.<locals>.FutureLikecss�dVSr
rrrrrrSrz9CoroutineTest.test_await_14.<locals>.FutureLike.__await__Nr�rrrr�
FutureLikeRr�rc@r�)z+CoroutineTest.test_await_14.<locals>.MarkerNr�rrrr�MarkerVrrc�s$�z��IdHWSty��wr
r�r)rrrr�coro1Ys��z*CoroutineTest.test_await_14.<locals>.coro1c�s�����IdHSr
rr)rrrr�coro2^rz*CoroutineTest.test_await_14.<locals>.coro2r�)r�r#rsr$r@r�r�)r
rr�r)rrrrr�
test_await_14Is
�
"�zCoroutineTest.test_await_14csrtjdd����fdd�}dd�}|�}|�d�|�td��||��d�Wd�dS1s2wYdS)Ncsr[r
rrrrrr�lr�z(CoroutineTest.test_await_15.<locals>.nopc�r�r
rrr�rrr�prz.CoroutineTest.test_await_15.<locals>.coroutinec�s�|IdHdSr
rr�rrr�waitersr�z+CoroutineTest.test_await_15.<locals>.waiterz"coroutine is being awaited already)rr�r#rsrt)r
r�r r&rr�r�
test_await_15ks

�"�zCoroutineTest.test_await_15cs2dd���fdd�}t|��\}}|�|j�dS)Nc�s�t�Sr
)r�rrrrrn�rz&CoroutineTest.test_await_16.<locals>.fc�s�zt���IdHYSr
)�KeyErrorr�rnrrr��s
�z&CoroutineTest.test_await_16.<locals>.g)r*r��__context__)r
r�r�r(rr#r�
test_await_16}szCoroutineTest.test_await_16cs�Gdd�d���fdd�}|�}t|�\}}|�|gd���fdd�}|�t��t|��Wd�dS1s:wYdS)Nc@�$eZdZdd�Zdd�Zdd�ZdS)z*CoroutineTest.test_with_1.<locals>.ManagercSr	r
)�name)r
r'rrrr�rz3CoroutineTest.test_with_1.<locals>.Manager.__init__c�s$�td|jd|jg�IdH|S)Nzenter-1-zenter-2-�rr'rrrr�
__aenter__�s
�
�z5CoroutineTest.test_with_1.<locals>.Manager.__aenter__c�s2�td|jd|jg�IdH|jdkrdSdS)Nzexit-1-zexit-2-�BTr(�r
r%rrr�	__aexit__�s�
�
�z4CoroutineTest.test_with_1.<locals>.Manager.__aexit__N)rrrrr)r,rrrr�Manager�sr-c
����d�4IdH�;}�d�4IdH�}td|j|jfg�IdHddWd�IdHn1IdHs4wYWd�IdHdS1IdHsJwYdS)N�Ar*�managersr,rr()r�r��r-rrrN��
�$
X�z&CoroutineTest.test_with_1.<locals>.foo)	z	enter-1-Az	enter-2-Az	enter-1-Bz	enter-2-B)r0r/r*zexit-1-Bzexit-2-Bzexit-1-Azexit-2-Ac
�r.)Nr/�Cr0r,rr()r�r�r1rrrN�r2)r*rRr@r�)r
rNrnr(r�rr1r�test_with_1�s�"�zCoroutineTest.test_with_1c�fGdd�d��d���fdd�}|�td��
t|��Wd�n1s&wY|��d�dS)Nc@rI)z%CoroutineTest.test_with_2.<locals>.CMcSrdr
rrrrrr)�r�z0CoroutineTest.test_with_2.<locals>.CM.__aenter__N)rrrr)rrrr�CM�r�r6c	��J�d���4IdH�d�Wd�IdHdS1IdHswYdS�NFTrr�r6�
body_executedrrrN��
�.�z&CoroutineTest.test_with_2.<locals>.foor,F�rs�AttributeErrorr*r�rurr9r�test_with_2���zCoroutineTest.test_with_2cr5)Nc@rI)z%CoroutineTest.test_with_3.<locals>.CMcSrdr
rrrrrr,�r�z/CoroutineTest.test_with_3.<locals>.CM.__aexit__N)rrrr,rrrrr6�r�r6c	�r7r8rrr9rrrN�r;z&CoroutineTest.test_with_3.<locals>.foor)Fr<rurr9r�test_with_3�r?zCoroutineTest.test_with_3cr5)Nc@r�)z%CoroutineTest.test_with_4.<locals>.CMNr�rrrrr6�rr6c	�r7r8rrr9rrrN�r;z&CoroutineTest.test_with_4.<locals>.foor)Fr<rurr9r�test_with_4�s�zCoroutineTest.test_with_4csVGdd�d����fdd�}��t��t|��Wd�dS1s$wYdS)Nc@r)z%CoroutineTest.test_with_5.<locals>.CMc���|Sr
rrrrrr)�rcz0CoroutineTest.test_with_5.<locals>.CM.__aenter__c�r�r
r)r
�excrrrr,�rcz/CoroutineTest.test_with_5.<locals>.CM.__aexit__N�rrrr)r,rrrrr6�rr6c	�sN���4IdH���dd�Wd�IdHdS1IdHs wYdS)Nr�r,)rRr�r6r
rrr��s�.�z'CoroutineTest.test_with_5.<locals>.func)r@�AssertionErrorr*)r
r�rrEr�test_with_5�s
"�zCoroutineTest.test_with_5cr�)Nc@r)z%CoroutineTest.test_with_6.<locals>.CMcS�dS)N�{rrrrrr)�r�z0CoroutineTest.test_with_6.<locals>.CM.__aenter__cWrH�Ni�r�r
�errrr,�r�z/CoroutineTest.test_with_6.<locals>.CM.__aexit__NrDrrrrr6�rr6c	�sB���4IdH�Wd�IdHdS1IdHswYdSr
rr�r6rrrN�s�.�z&CoroutineTest.test_with_6.<locals>.foozV'async with' received an object from __aenter__ that does not implement __await__: intr�rurrMr�test_with_6�s�"�zCoroutineTest.test_with_6c
s�Gdd�d���fdd�}zt|��Wn-tyA}z!|�|jdd�|�|jdu�|�t|jt��WYd}~dSd}~ww|�d�dS)Nc@r)z%CoroutineTest.test_with_7.<locals>.CMc�rBr
rrrrrr)rcz0CoroutineTest.test_with_7.<locals>.CM.__aenter__cWrH)Ni�rrKrrrr,r�z/CoroutineTest.test_with_7.<locals>.CM.__aexit__NrDrrrrr6
rr6c	�sJ���4IdH�ddWd�IdHdS1IdHswYdS�Nr,rrrrMrrrNs�
.�z&CoroutineTest.test_with_7.<locals>.foor�U'async with' received an object from __aexit__ that does not implement __await__: intz1invalid asynchronous context manager did not fail)	r*r~rwr%rSr$�
isinstancer��fail�r
rNrCrrMr�test_with_7	s� ��zCoroutineTest.test_with_7csVd�Gdd�d����fdd�}|�td��
t|��Wd�n1s&wY|��d���fdd�}|�td��
t|��Wd�n1sNwY|��d	���fd
d�}|�td��
t|��Wd�n1svwY|��d���fdd�}|�td��
t|��Wd�n1s�wY|��d
�dS)Nrc@r)z%CoroutineTest.test_with_8.<locals>.CMc�rBr
rrrrrr)'rcz0CoroutineTest.test_with_8.<locals>.CM.__aenter__cWrHrJrrKrrrr,*r�z/CoroutineTest.test_with_8.<locals>.CM.__aexit__NrDrrrrr6&rr6c	��J���4IdH��d7�Wd�IdHdS1IdHswYdSr�rr�r6�CNTrrrN.��
.�z&CoroutineTest.test_with_8.<locals>.foorPr,c
�s\�td�D]&}��4IdH��d7�	Wd�IdHdS1IdHs&wYqdS�Nr+r,�rOrKrVrrrN:s�0��r+c
�sX�td�D]$}��4IdH��d7�	Wd�IdHq1IdHs$wYqdSrYrZrKrVrrrNHs�,��r�c	�sL���4IdH��d7�	Wd�IdHdS1IdHswYdSr�rrrVrrrNVs
�0��)rsr~r*rRrurrVr�test_with_8#sD��������zCoroutineTest.test_with_8c�dd�Gdd�d����fdd�}|�t��
t|��Wd�n1s%wY|��d�dS)Nrc@r)z%CoroutineTest.test_with_9.<locals>.CMc�rBr
rrrrrr)grcz0CoroutineTest.test_with_9.<locals>.CM.__aenter__c���dddSrOrrKrrrr,jrz/CoroutineTest.test_with_9.<locals>.CM.__aexit__NrDrrrrr6frr6c	�rUr�rrrVrrrNmrXz&CoroutineTest.test_with_9.<locals>.foor,�r@r�r*rRrurrVr�test_with_9cs�zCoroutineTest.test_with_9c
s�d�Gdd�d����fdd�}zt|��Wn.tyE}z"|�|jdu�|�t|jt��|�t|jjt��WYd}~dSd}~ww|�d�dS)Nrc@r)z&CoroutineTest.test_with_10.<locals>.CMc�rBr
rrrrrr){rcz1CoroutineTest.test_with_10.<locals>.CM.__aenter__c�r^rOrrKrrrr,~rz0CoroutineTest.test_with_10.<locals>.CM.__aexit__NrDrrrrr6zrr6c
�sl���4IdH�!��4IdH�t�1IdHswYWd�IdHdS1IdHs/wYdSr
�rtrrVrrrN�s��.�z'CoroutineTest.test_with_10.<locals>.fooz*exception from __aexit__ did not propagate)r*r�rSr$rQrtrRrSrrVr�test_with_10ws���zCoroutineTest.test_with_10c
std�Gdd�d����fdd�}zt|��Wnty2}z|�|jdu�WYd}~dSd}~ww|�d�dS)Nrc@r)z&CoroutineTest.test_with_11.<locals>.CMc�rqr
)�NotImplementedErrorrrrrr)�rcz1CoroutineTest.test_with_11.<locals>.CM.__aenter__c�r^rOrrKrrrr,�rz0CoroutineTest.test_with_11.<locals>.CM.__aexit__NrDrrrrr6�rr6c	�s0���4IdH�t�1IdHswYdSr
rarrVrrrN�s��z'CoroutineTest.test_with_11.<locals>.fooz+exception from __aenter__ did not propagate)r*rcrSr$rRrSrrVr�test_with_11�s��zCoroutineTest.test_with_11cs0d�Gdd�d�����fdd�}t|��dS)Nrc@r)z&CoroutineTest.test_with_12.<locals>.CMc�rBr
rrrrrr)�rcz1CoroutineTest.test_with_12.<locals>.CM.__aenter__c�r`�NTrrKrrrr,�rcz0CoroutineTest.test_with_12.<locals>.CM.__aexit__NrDrrrrr6�rr6c	�s>���4IdH�
}��|j��t�1IdHswYdSr
)r�rrt��cm�r6rWr
rrrN�s
��z'CoroutineTest.test_with_12.<locals>.foo)r*rurrhr�test_with_12�szCoroutineTest.test_with_12cr])Nrc@r)z&CoroutineTest.test_with_13.<locals>.CMc�r^rOrrrrrr)�rz1CoroutineTest.test_with_13.<locals>.CM.__aenter__c�r`rerrKrrrr,�rcz0CoroutineTest.test_with_13.<locals>.CM.__aexit__NrDrrrrr6�rr6c	�sX��d7���4IdH��d7�Wd�IdHn1IdHs!wY�d7�dS)Nr,r�'rrrVrrrN�s�
(�z'CoroutineTest.test_with_13.<locals>.foor,r_rurrVr�test_with_13�s�zCoroutineTest.test_with_13csHd�G�fdd�d��g���fdd�}t|��\}}|��d�|�|dd�tdd	�D��|��d
d�tdd�D��g���fdd
�}t|��\}}|��d�|�|ddg�|��dd�tdd�D�dg�g���fdd�}t|��\}}|��d�|�|dd�tdd	�D��|��dd�tdd�D�ddg�dS)Nrcs(eZdZdd�Z�fdd�Zdd�ZdS)z+CoroutineTest.test_for_1.<locals>.AsyncItercS�
d|_dS�NrrKrrrrr�rz4CoroutineTest.test_for_1.<locals>.AsyncIter.__init__cs�d7�|Sr�rr��aiter_callsrr�	__aiter__�sz5CoroutineTest.test_for_1.<locals>.AsyncIter.__aiter__c�sH�|jd7_|jdst|jd�IdH|jdkrt�|j|jfS)Nr,rbr�)r/r�StopAsyncIterationrrrr�	__anext__�s�

z5CoroutineTest.test_for_1.<locals>.AsyncIter.__anext__N�rrrrrprrrrnrr�	AsyncIter�srtc�s.���2z3dHW\}}��||�q6dSr
�r")�i1�i2�rtr'rr�test1�s��z'CoroutineTest.test_for_1.<locals>.test1r,cS�g|]}|d�qS�r�rr�rrrr���z,CoroutineTest.test_for_1.<locals>.<listcomp>�cSrz)r+rr�rrrr��r|�ec�sN���2z3dHW}��|d�|ddkrnq6��d���d�dS�Nr��what?�endrurKrxrr�test2�s���
z'CoroutineTest.test_for_1.<locals>.test2r+r���cSr�rrr�rrrr�r��r�c�sL���2z3dHW}|ddkrq��|d�q6��d���d�dSrrurKrxrr�test3s��
z'CoroutineTest.test_for_1.<locals>.test3r�cSrzr{rr�rrrr�r|cSr�rrr�rrrr�r�r�)r*rRrO)r
ry�yieldedr�r�r�r)rtror'r�
test_for_1�s,
"

�zCoroutineTest.test_for_1csfd�t���}�fdd�}|�td��
t|��Wd�n1s#wY|�t���|�dS)Nr�c��"��2z
3dHW}td�q6dS�Nznever going to happen��printrK��tuprrrN��
�z%CoroutineTest.test_for_2.<locals>.fooz/async for' requires an object.*__aiter__.*tuple��sys�getrefcountrsr~r*rR)r
�refs_beforerNrr�r�
test_for_2s
��zCoroutineTest.test_for_2c�vGdd�d�}|��t���}�fdd�}|�td��
t|��Wd�n1s+wY|�t���|�dS)Nc@rI)z#CoroutineTest.test_for_3.<locals>.IcSrr
rrrrrrp'r�z-CoroutineTest.test_for_3.<locals>.I.__aiter__N�rrrrprrrr�I&r�r�c�r�r�r�rK��aiterrrrN-r�z%CoroutineTest.test_for_3.<locals>.fooz!that does not implement __anext__r��r
r�r�rNrr�r�
test_for_3%s
��zCoroutineTest.test_for_3cr�)Nc@r)z#CoroutineTest.test_for_4.<locals>.IcSrr
rrrrrrp;r�z-CoroutineTest.test_for_4.<locals>.I.__aiter__cSrH)Nrrrrrrrr>r�z-CoroutineTest.test_for_4.<locals>.I.__anext__N)rrrrprrrrrrr�:rr�c�r�r�r�rKr�rrrNDr�z%CoroutineTest.test_for_4.<locals>.fooz7async for' received an invalid object.*__anext__.*tupler�r�rr�r�
test_for_49s
��zCoroutineTest.test_for_4csd�G�fdd�d��Gdd�d��������t���}t���}���fdd�}t���t�d�t|��Wd�n1sCwY|��d	�|�t���|�|�t���|����fd
d�}t|��|��d����fdd�}t|��|��d
�dS)Nrcs$eZdZ�fdd�Z�fdd�ZdS)z)CoroutineTest.test_for_6.<locals>.Managerc����d7�dS)Nrjrr�r�rrr)T��z4CoroutineTest.test_for_6.<locals>.Manager.__aenter__c�r�)Ni��rr+r�rrr,Xr�z3CoroutineTest.test_for_6.<locals>.Manager.__aexit__NrDrr�rrr-Ssr-c@r&)z*CoroutineTest.test_for_6.<locals>.IterablecSrlrmrKrrrrr]rz3CoroutineTest.test_for_6.<locals>.Iterable.__init__cSrr
rrrrrrp`r�z4CoroutineTest.test_for_6.<locals>.Iterable.__aiter__c�s$�|jdkrt�|jd7_|jS�Nrbr,)r/rqrrrrrrcs
�
z4CoroutineTest.test_for_6.<locals>.Iterable.__anext__Nrsrrrr�Iterable\sr�c	�sb��4IdH��2z
3dHW}�d7�q
6Wd�IdHn1IdHs&wY�d7�dS�Nr,rrrK)r��iterable�managerrr�mainps�
�(�z&CoroutineTest.test_for_6.<locals>.main�errori��c	�s����4IdH���2z
3dHW}�d7�q6Wd�IdHn1IdHs(wY�d7���4IdH���2z
3dHW}�d7�q<6Wd�IdHn1IdHsXwY�d7�dSr�rrK�r�r�r-rrr��s�
�(�
�(�i�c	�s����4IdH�"�d7���2z
3dHW}�d7�q6�d7�Wd�IdHn1IdHs0wY�d7���4IdH�"�d7���2z
3dHW}�d7�qH6�d7�Wd�IdHn1IdHshwY�d7�dS)Nr�r,i���rrrKr�rrr��s"�
�
(�
�
(�i��9)r�r�r2r3r4r*rR)r
�mrefs_before�irefs_beforer�r)r�r�r-r�r�r�
test_for_6Ps*	



�


zCoroutineTest.test_for_6csdd�Gdd�d����fdd�}|�t��
t|��Wd�n1s%wY|��d�dS)Nrc@rI)z$CoroutineTest.test_for_7.<locals>.AIcS�dddSrOrrrrrrp��z.CoroutineTest.test_for_7.<locals>.AI.__aiter__Nr�rrrr�AI�r�r�c��,���2z
3dHW}�d7�q6�d7�dS�Nr,rbrrK�r�rWrrrN��
�
�z%CoroutineTest.test_for_7.<locals>.foor_rurr�r�
test_for_7�s�zCoroutineTest.test_for_7c	s�d�Gdd�d����fdd�}|�t��&t���t�d�t|��Wd�n1s/wYWd�n1s>wY|��d�dS)Nrc@rI)z$CoroutineTest.test_for_8.<locals>.AIcSr�rOrrrrrrp�r�z.CoroutineTest.test_for_8.<locals>.AI.__aiter__Nr�rrrrr��r�r�c�r�r�rrKr�rrrN�r�z%CoroutineTest.test_for_8.<locals>.foor�)r@r�r2r3r4r*rRrurr�r�
test_for_8�s

���zCoroutineTest.test_for_8csjGdd�d���fdd�}|�td��}|��d�Wd�n1s$wY|j}|�|jt�dS)Nc@r&)z$CoroutineTest.test_for_11.<locals>.FcSrr
rrrrrrp�r�z.CoroutineTest.test_for_11.<locals>.F.__aiter__cSrr
rrrrrrr�r�z.CoroutineTest.test_for_11.<locals>.F.__anext__cSr�rOrrrrrr�r�z.CoroutineTest.test_for_11.<locals>.F.__await__N)rrrrprrrrrrr�F�sr�c�s���2z3dHW}q6dSr
r)r��r�rrr��s��z'CoroutineTest.test_for_11.<locals>.mainz an invalid object from __anext__)rsr~r#�	exceptionrg�	__cause__r�)r
r�r��errrr�r�test_for_11�s��zCoroutineTest.test_for_11c�|Gdd�dt��Gdd�dt��g����fdd�}|����|��d�Wd�n1s0wY|��dg�dS)Nc@r�)z*CoroutineTest.test_for_tuple.<locals>.DoneNr�rrrr�Done��r�c@� eZdZdZdd�Zdd�ZdS)z+CoroutineTest.test_for_tuple.<locals>.AIterrcSrr
rrrrrrp�r�z5CoroutineTest.test_for_tuple.<locals>.AIter.__aiter__c�s0�|jt|�kr
t�|jd7_||jdSr�)r/�lenrqrrrrrr�s
�z5CoroutineTest.test_for_tuple.<locals>.AIter.__anext__N�rrrr/rprrrrrr�AIter��r�c�s*��dg�2z3dHW}��|�q6��r�rurK�r�r�r(rrrN�s
��z)CoroutineTest.test_for_tuple.<locals>.foor�)r�r�r@r#rRrurr�r�test_for_tuple��
�zCoroutineTest.test_for_tuplecr�)Nc@r�)z3CoroutineTest.test_for_stop_iteration.<locals>.DoneNr�rrrrr��r�r�c@r�)z4CoroutineTest.test_for_stop_iteration.<locals>.AIterrcSrr
rrrrrrp�r�z>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__aiter__c�s �|jrt�|jd7_|jSr�)r/rqrrrrrrr�s
�z>CoroutineTest.test_for_stop_iteration.<locals>.AIter.__anext__Nr�rrrrr��r�r�c�s(��d�2z3dHW}��|�q6��r�rurKr�rrrNs
��z2CoroutineTest.test_for_stop_iteration.<locals>.foor�)r�r$r@r#rRrurr�r�test_for_stop_iteration�r�z%CoroutineTest.test_for_stop_iterationcs�dd���fdd�}�fdd�}�fdd�}�fd	d
�}|�t|��gddgf�|�t|��gddhf�|�t|��gd
d
d�f�|�t|��gddd�f�dS)Nc�rBr
rrKrrrrnrcz$CoroutineTest.test_comp_1.<locals>.fc��"�dd��d��d�fD�IdHS)Nc�s�g|]}|IdH�qSr
r�r�r�rrrr���z?CoroutineTest.test_comp_1.<locals>.run_list.<locals>.<listcomp>r,�)rrr#rr�run_list�� z+CoroutineTest.test_comp_1.<locals>.run_listc�r�)Nc�s�h|]}|IdH�qSr
rr�rrr�	<setcomp>r�z=CoroutineTest.test_comp_1.<locals>.run_set.<locals>.<setcomp>r,r�rrr#rr�run_setr�z*CoroutineTest.test_comp_1.<locals>.run_setc�r�)Nc�s�i|]}|IdHd�qS)Nr�rr�rrr�
<dictcomp>s�z@CoroutineTest.test_comp_1.<locals>.run_dict1.<locals>.<dictcomp>r,r�rrr#rr�	run_dict1r�z,CoroutineTest.test_comp_1.<locals>.run_dict1c�s&�dd�t�d��d�g�D�IdHS)Nc�s�i|]
\}}||IdH�qSr
r)r�r/r�rrrr�s�z@CoroutineTest.test_comp_1.<locals>.run_dict2.<locals>.<dictcomp>r,r�)�	enumeraterr#rr�	run_dict2��$z,CoroutineTest.test_comp_1.<locals>.run_dict2r,r�r�)r,r�)rr,r�)r
r�r�r�r�rr#r�test_comp_1s zCoroutineTest.test_comp_1cs~dd���fdd�}|�t|��ggd�f��fdd�}|�t|��ghd�f��fd	d
�}|�t|��gddhf�dS)
Nc�rBr
rrKrrrrn$rcz$CoroutineTest.test_comp_2.<locals>.fc�s2�dd��d��d��d��ddg�fD�IdHS)Nc�s"�g|]}|IdHD]}|�q
qSr
r�r�r��srrrr�(s��
�z?CoroutineTest.test_comp_2.<locals>.run_list.<locals>.<listcomp>��abc�de�fgrrr#rrr�'s�0z+CoroutineTest.test_comp_2.<locals>.run_list)r�r�r�r�r�c�s.�dd���ddg��dg�g�fD�IdHS)Nc�s2�h|]}|IdHD]}|IdHD]}|�qq
qSr
r)r�r�r��drrrr�0s����z=CoroutineTest.test_comp_2.<locals>.run_set.<locals>.<setcomp>rb�r�rrr#rrr�/s���z*CoroutineTest.test_comp_2.<locals>.run_set>rbr�r�c�s(�dd���d��d�g�fD�IdHS)Nc�s(�h|]}|IdHD]}|IdH�q
qSr
rr�rrrr�;s���z>CoroutineTest.test_comp_2.<locals>.run_set2.<locals>.<setcomp>rbr�rrr#rr�run_set2:s��z+CoroutineTest.test_comp_2.<locals>.run_set2rbr�r�)r
r�r�r�rr#r�test_comp_2#s 
�
�
�zCoroutineTest.test_comp_2cs�dd���fdd�}|�t|��gddgf��fdd�}|�t|��gddhf��fd	d
�}|�t|��gddd
�f��fdd�}|�t|��gddgf�dS)NcS��|D]}|VqdSr
r�r�r/rrrrnD���z$CoroutineTest.test_comp_3.<locals>.fc���dd��ddg�2�IdHS)Nc�� �g|z
3dHW}|d�q6Sr�rr�rrrr�I��z?CoroutineTest.test_comp_3.<locals>.run_list.<locals>.<listcomp>rbr�rrr#rrr�H��z+CoroutineTest.test_comp_3.<locals>.run_listr}r�c�r�)Nc�s �h|z
3dHW}|d�q6Sr�rr�rrrr�Or�z=CoroutineTest.test_comp_3.<locals>.run_set.<locals>.<setcomp>rbr�rrr#rrr�Nr�z*CoroutineTest.test_comp_3.<locals>.run_setc�r�)Nc�s&�i|z
3dHW}|d|d�q6Sr�rr�rrrr�Us�$z?CoroutineTest.test_comp_3.<locals>.run_dict.<locals>.<dictcomp>rbr�rrr#rr�run_dictTr�z+CoroutineTest.test_comp_3.<locals>.run_dict��)r}r�c��,�dd��ddg�2�}dd�|2�IdHS)NcSs"�|z3dHW}|dVq6dSr�rr�rrr�	<genexpr>[�� z=CoroutineTest.test_comp_3.<locals>.run_gen.<locals>.<genexpr>rbr�c�r��Nr�r�r�r�rrrr�\r�z>CoroutineTest.test_comp_3.<locals>.run_gen.<locals>.<listcomp>rr�r#rr�run_genZ��z*CoroutineTest.test_comp_3.<locals>.run_gen�o�yr��r
r�r�r�r�rr#r�test_comp_3Cs*
�
��
�zCoroutineTest.test_comp_3cs�dd���fdd�}|�t|��gdgf��fdd�}|�t|��gdhf��fdd	�}|�t|��gdd
if��fdd�}|�t|��gd
gf�dS)NcSr�r
rr�rrrrnbr�z$CoroutineTest.test_comp_4.<locals>.fc�r�)Nc�s(�g|z3dHW}|dkr|d�q6Sr�rr�rrrr�g��&z?CoroutineTest.test_comp_4.<locals>.run_list.<locals>.<listcomp>rbr�rrr#rrr�fr�z+CoroutineTest.test_comp_4.<locals>.run_listr�c�r�)Nc�s(�h|z3dHW}|dkr|d�q6Sr�rr�rrrr�mr�z=CoroutineTest.test_comp_4.<locals>.run_set.<locals>.<setcomp>rbr�rrr#rrr�lr�z*CoroutineTest.test_comp_4.<locals>.run_setc�r�)Nc�s.�i|z3dHW}|dkr|d|d�q6S)Nrbr,r+rr�rrrr�ss�,z?CoroutineTest.test_comp_4.<locals>.run_dict.<locals>.<dictcomp>rbr�rrr#rrr�rr�z+CoroutineTest.test_comp_4.<locals>.run_dictr�c�r�)NcSs*�|z3dHW}|dkr|dVq6dSr�rr�rrrr�ys�(z=CoroutineTest.test_comp_4.<locals>.run_gen.<locals>.<genexpr>rbr�c�r�r�rr�rrrr�zr�z>CoroutineTest.test_comp_4.<locals>.run_gen.<locals>.<listcomp>rr�r#rrr�xr�z*CoroutineTest.test_comp_4.<locals>.run_genr�r�r�rr#r�test_comp_4as*��
��zCoroutineTest.test_comp_4cs�dd���fdd�}|�t|��ggd�f��fdd�}|�t|��ghd�f��fd	d
�}|�t|��gddd
d�f��fdd�}|�t|��ggd�f�dS)NcSr�r
rr�rrrrn�r�z&CoroutineTest.test_comp_4_2.<locals>.fc���dd��td��2�IdHS)Nc�s8�g|z3dHW}d|krdkrnn|d�q6S�Nrr[rbrr�rrrr����6zACoroutineTest.test_comp_4_2.<locals>.run_list.<locals>.<listcomp>�rZrr#rrr��r�z-CoroutineTest.test_comp_4_2.<locals>.run_list)r}r��
c�r�)Nc�s8�h|z3dHW}d|krdkrnn|d�q6Sr�rr�rrrr��r�z?CoroutineTest.test_comp_4_2.<locals>.run_set.<locals>.<setcomp>r�rZrr#rrr��r�z,CoroutineTest.test_comp_4_2.<locals>.run_set>r}r�r�c�r�)Nc�s>�i|z3dHW}d|krdkrnn|d|d�q6S)Nrr[rbr�rr�rrrr��s�<zACoroutineTest.test_comp_4_2.<locals>.run_dict.<locals>.<dictcomp>r�rZrr#rrr��r�z-CoroutineTest.test_comp_4_2.<locals>.run_dictr~r��gc�s,�dd��td��2�}dd�|2�IdHS)NcSs:�|z3dHW}d|krdkrnn|dVq6dSr�rr�rrrr��s�8z?CoroutineTest.test_comp_4_2.<locals>.run_gen.<locals>.<genexpr>r�c�r�r�rr�rrrr��r�z@CoroutineTest.test_comp_4_2.<locals>.run_gen.<locals>.<listcomp>rZr�r#rrr��r�z,CoroutineTest.test_comp_4_2.<locals>.run_gen)r��p�qr�r�rr#r�
test_comp_4_2s*
�
��
�zCoroutineTest.test_comp_4_2cs0dd���fdd�}|�t|��gdgf�dS)NcSr�r
rr�rrrrn�r�z$CoroutineTest.test_comp_5.<locals>.fc�s&��fdd�ddgddgfD�IdHS)Nc	�sB�g|]}|ddkr�|�2z3dHW}|dkr|d�q6qS)rrbNr�r,r)r��pairr/r#rrr��s��
�
z?CoroutineTest.test_comp_5.<locals>.run_list.<locals>.<listcomp>rbr�r��(rrr#rrr��r�z+CoroutineTest.test_comp_5.<locals>.run_listr�r��r
r�rr#r�test_comp_5�s�zCoroutineTest.test_comp_5cs2dd���fdd�}|�t|��ggd�f�dS)NcSr�r
rr�rrrrn�r�z$CoroutineTest.test_comp_6.<locals>.fc�r�)Nc�s*�g|z3dHW}|D]}|d�qq6Sr�r)r��seqr/rrrr��s���z?CoroutineTest.test_comp_6.<locals>.run_list.<locals>.<listcomp>)rbr�)r�rrr#rrr��r�z+CoroutineTest.test_comp_6.<locals>.run_list)r}r��r�rrr#r�test_comp_6�s
�zCoroutineTest.test_comp_6csPdd���fdd�}|�td��t|��Wd�dS1s!wYdS)NcSs�dVdVtd��)Nr,r+�aaa)r�rrrrrn�s�z$CoroutineTest.test_comp_7.<locals>.fc�s�dd���2�IdHS)Nc���g|z3dHW}|�q6Sr
rr�rrrr����z?CoroutineTest.test_comp_7.<locals>.run_list.<locals>.<listcomp>rrr#rrr��r�z+CoroutineTest.test_comp_7.<locals>.run_listr)rsr�r*rrr#r�test_comp_7�s
"�zCoroutineTest.test_comp_7cCs&dd�}|�t|��ggd�f�dS)Nc�s�dd�dD�S)NcSr�rrr�rrrr��r�z8CoroutineTest.test_comp_8.<locals>.f.<locals>.<listcomp>r�rrrrrrn�r�z$CoroutineTest.test_comp_8.<locals>.fr�r��r
rnrrr�test_comp_8�s

�zCoroutineTest.test_comp_8cs2dd���fdd�}|�t|��gddgf�dS)NcSs�dVdVdSr�rrrrrr\�s�
z&CoroutineTest.test_comp_9.<locals>.genc�s&�dd���2�IdH}dd�|D�S)Nc�rr
rr�rrrr��rz8CoroutineTest.test_comp_9.<locals>.f.<locals>.<listcomp>cSr�rrr�rrrr��r�r)�lr�rrrn�s�z$CoroutineTest.test_comp_9.<locals>.fr,r+r�r	rr�r�test_comp_9�s
�zCoroutineTest.test_comp_9cCs*dd�}|�t|��gdddd�f�dS)Nc�s�dd�dD�}dd�|D�S)NcSsh|]}|�qSrrr�rrrr��r�z8CoroutineTest.test_comp_10.<locals>.f.<locals>.<setcomp>r�cSsi|]}||�qSrr)r��xrrrr��sz9CoroutineTest.test_comp_10.<locals>.f.<locals>.<dictcomp>r)�xxrrrrn�s�z%CoroutineTest.test_comp_10.<locals>.fr,r+r�r�r�r	rrr�test_comp_10�s
�zCoroutineTest.test_comp_10cCs�dd�}|�}|�t��
t�|�Wd�n1swY|��}z(|�t��
t�|�Wd�n1s;wYW|��dSW|��dS|��w)Nc�r�r
rrrrrr��r�z%CoroutineTest.test_copy.<locals>.func)r@r~�copyrry)r
r�r&r.rrr�	test_copy�s���zCoroutineTest.test_copyc	Cs�dd�}|�}ttjd�D] }|�ttjf��t�||�Wd�n1s)wYq|��}z/ttjd�D] }|�ttjf��t�||�Wd�n1sVwYq;W|��dS|��w)Nc�r�r
rrrrrr��r�z'CoroutineTest.test_pickle.<locals>.funcr,)	rO�pickle�HIGHEST_PROTOCOLr@r~�
PicklingError�dumpsrry)r
r�r&�protor.rrr�test_pickle�s �����zCoroutineTest.test_picklec	Cs�dd�}t���Kt���.}t�d�|�}t|�}d}t��|�dt|j	j
��|�t|j	j�|�Wd�n1s>wYWd�dSWd�dS1sVwYdS)Nc�r�r
rrrrrr��r�z3CoroutineTest.test_fatal_coro_warning.<locals>.funcr�zwas never awaited)
r2r3r�catch_unraisable_exception�filterwarningsrxr5r��str�
unraisable�	exc_valuerR�object)r
r�rgr&�	coro_reprrrr�test_fatal_coro_warning�s
�
P�z%CoroutineTest.test_fatal_coro_warningcs�Gdd�d�}|��dd�����fdd�}��t|��gdf����fdd	�}��t|��gdf����fd
d�}��t|��gdf�dS)Nc@rI)zMCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTargetcS�td��r��rq)r
�keyrrrr�__setitem__�zYCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.BadTarget.__setitem__N)rrrr#rrrr�	BadTargetr�r%cSs�dVdSrarrrrr�sourcer�zJCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.sourcec�sZ���t��}��2z3dHW�d<q
6Wd�n1swY��|jjd�dS)Nr�r�r��r@rqrRr�r%rf�r
r&�tgtrr�run_for����zKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_forr�c�sZ���t��}�fdd���2�IdHWd�S1swY��|jjd�dS)Nc�s �g|z
3dHW�d<d�q6Srmr�r��r*rrr�r�z`CoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_list.<locals>.<listcomp>r'r�r(rfr)rrr�s� �zLCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_listc�sz��fdd���2�}|�d�}��t��
}|IdHWd�n1s%wY��|jjt���|jjjd�dS)Ncs"�|z3dHW�d<dVq6dSrmrr-r.rrr�"r�z^CoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_gen.<locals>.<genexpr>r'r��	�asendr@rtrgr�r�rqrRr%�r\r�rgr)rrr�!s�
�zKCoroutineTest.test_for_assign_raising_stop_async_iteration.<locals>.run_genr�)r
r%r+r�r�rr)r�,test_for_assign_raising_stop_async_iteration
sz:CoroutineTest.test_for_assign_raising_stop_async_iterationcs�Gdd�d���fdd����fdd�}��t|��gdf���fdd	�}��t|��gdf���fd
d�}��t|��gdf�dS)Nc@rI)zQCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterablecSr r�r!rrrrr�-r$zZCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.BadIterable.__iter__N)rrrr�rrrr�BadIterable,r�r3cs���VdSr
rr)r3rr�badpairs/rzNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.badpairsc�sZ���t��}��2z3dHW\}}q
6Wd�n1swY��|jjd�dS)Nr'r�r()rgr/�j�r4r
rrr+2r,zMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_forr�c�sV���t��}dd���2�IdHWd�S1swY��|jjd�dS)Nc�s �g|z
3dHW\}}d�q6Srmr�r�r/r5rrrr�<r�zbCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_list.<locals>.<listcomp>r'r�r(rfr6rrr�:s� �zNCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_listc�sv�dd���2�}|�d�}��t��
}|IdHWd�n1s#wY��|jjt���|jjjd�dS)NcSs"�|z3dHW\}}dVq6dSrmrr7rrrr�Br�z`CoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_gen.<locals>.<genexpr>r'r�r/r1r6rrr�As�
�zMCoroutineTest.test_for_assign_raising_stop_async_iteration_2.<locals>.run_genr�)r
r+r�r�r)r3r4r
r�.test_for_assign_raising_stop_async_iteration_2+sz<CoroutineTest.test_for_assign_raising_stop_async_iteration_2csP�fdd�}�fdd��tjdd���|�}|�d�}|�t�}|�||�dS)Nc�r�r
rrrrrr�Mrz6CoroutineTest.test_stack_in_coroutine_throw.<locals>.ac�r�r
rrrrrr�Prz6CoroutineTest.test_stack_in_coroutine_throw.<locals>.bcss:�z
tt���VWdStytt���VYdSwr
)r��	traceback�
extract_stackr�rrrrr�Ss��z6CoroutineTest.test_stack_in_coroutine_throw.<locals>.c)rr�r#r�r�rR)r
r�r&�len_send�	len_throwr)r�r�r�test_stack_in_coroutine_throwKs


z+CoroutineTest.test_stack_in_coroutine_throwN)Srrrr_rorvrzr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrr!r%r4r>r@rArGrNrTr\r`rbrdrirkr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
rrrrrr2r8r=rrrrrZ�s�	#
	(	


"(@H\ 
	
! rZc@rI)�CoroAsyncIOCompatTestc	s�t�d��Gdd�dt��g�G��fdd�d������fdd�}���}��|�zz|�|��Wn	�y=YnwW|����d�n
|����d�w|��gd��dS)	N�asyncioc@r�)z9CoroAsyncIOCompatTest.test_asyncio_1.<locals>.MyExceptionNr�rrrr�MyExceptionjrr@cs(eZdZ��fdd�Z��fdd�ZdS)z0CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CMc�s*���d���d�IdH��d�|S)Nr,�{�G�z�?r+)r"�sleepr�r?r'rrr)ps
�

z;CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aenter__c�s"���d�IdH��|j�dS)NrA)rBr"r)r
�exc_type�exc_val�exc_tbrCrrr,vs�z:CoroAsyncIOCompatTest.test_asyncio_1.<locals>.CM.__aexit__NrDrrCrrr6osr6c	�sJ���4IdH�}��d�IdH��1IdHswY��d�dS)NrA�unreachable)rBr"r�r6r@r?r'rrrnzs��z/CoroAsyncIOCompatTest.test_asyncio_1.<locals>.f)r,r+r@)	r�
import_moduler��new_event_loop�set_event_loop�run_until_completery�set_event_loop_policyrR)r
rn�looprrHr�test_asyncio_1es$

���z$CoroAsyncIOCompatTest.test_asyncio_1N)rrrrOrrrrr>crYr>c@r7)
�OriginTrackingTestcCst�t��j�}|j|jfSr
)rT�getframeinfo�currentframe�f_back�filename�lineno)r
�inforrr�here�szOriginTrackingTest.herec	st��}�zdd��t�d���t��d�t�����}��|j�Wd�n1s.wYt�d���t��d����\}}t�����}��|j||ddff�Wd�n1sdwYt�d���t��d���fdd�}���\}}|�\\}}}t�|����|j||d	f||ddff�Wd�n1s�wYt�d
�t�����}��	dt
|j�ko�d
kn�Wd�n1s�wY��t��
t�d�Wd�n1s�wY��t��d
�Wt�|�dSt�|�w)Nc�r�r
rrrrr�corofn�rcz7OriginTrackingTest.test_origin_tracking.<locals>.corofnrr,�test_origin_trackingr+cs�����fSr
)rWr�rXr
rr�nested�sz7OriginTrackingTest.test_origin_tracking.<locals>.nestedr[r���)
r��#get_coroutine_origin_tracking_depth�#set_coroutine_origin_tracking_depthrR�
contextlib�closingr��	cr_originrWrSr�r@r�)r
�
orig_depthr&�fnamerUr[�nested_fname�
nested_linenorrZrrY�sJ
�
��
���
&��z'OriginTrackingTest.test_origin_trackingc
sdd�����\}}�fdd��|d7}���\}}�fdd��|d7}��fdd	�}t��}zK|d
d�j�d��}|d
d�d�j�d�dd|�d|�d�dg��|dd�d�j�d�dd|�d|�d�dd|�d|�d�dg��Wt�|�dSt�|�w)Nc�r�r
rrrrrrX�rcz?OriginTrackingTest.test_origin_tracking_warning.<locals>.corofnc���Sr
rr)rXrr�a1��z;OriginTrackingTest.test_origin_tracking_warning.<locals>.a1r+crfr
rr)rgrr�a2�rhz;OriginTrackingTest.test_origin_tracking_warning.<locals>.a2csXt�|���t��}��t��Wd�n1swY��|t|j��dSr
)	r�r^�assertWarnsr�rr5rRr�warning)�depth�msgrg)rir
rrr��s

�z>OriginTrackingTest.test_origin_tracking_warning.<locals>.checkrzcoroutine 'z' was never awaitedr,r�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
)rWr�r]rrQr^)r
�a1_filename�	a1_lineno�a2_filename�	a2_linenor�rbrmr)rgrirXr
r�test_origin_tracking_warning�s4�
�
z/OriginTrackingTest.test_origin_tracking_warningc	Csdd�}tj}zzdd�t_t���=}t�dtf��&|�}t|�}~t��|�	t|j
j�|�|�	|j
jt
�Wd�n1sBwYWd�n1sQwYt`t�dtf��|�t��Wd�n1sqwYW|t_dSW|t_dS|t_w)Nc�r�r
rrrrrrX�rczLOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.corofncSsddSrOrr�rrrr�szNOriginTrackingTest.test_unawaited_warning_when_module_broken.<locals>.<lambda>zcoroutine .* was never awaited)r2�_warn_unawaited_coroutinerrr�check_warningsr�rxr5rRrrrDr�)r
rX�orig_wucrgr&rrrr�)test_unawaited_warning_when_module_broken�s<

������
�
�z<OriginTrackingTest.test_unawaited_warning_when_module_brokenN)rrrrWrYrrrvrrrrrP�s
.*rPc@rI)�"UnawaitedWarningDuringShutdownTestcCs.d}td|�d}td|�d}td|�dS)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)r
r;rrr�&test_unawaited_warning_during_shutdown	s

zIUnawaitedWarningDuringShutdownTest.test_unawaited_warning_during_shutdownN)rrrrxrrrrrw
	rYrwc@r&)�CAPITestcs0ddlm��fdd�}|�|��d�d�dS)Nr��	awaitTypec�s��tdg��}|IdHSr�r���future��atrrrN(	s�
z%CAPITest.test_tp_await_1.<locals>.foor,)�	_testcapir{rRr#rurr~r�test_tp_await_1%	szCAPITest.test_tp_await_1cCs2ddlm}|tdg��}|�t|���d�dS)Nrrzr,)r�r{r�rRr-r)r
rr}rrr�test_tp_await_2.	szCAPITest.test_tp_await_2cs^ddlm��fdd�}|�td��|�|��d�d�Wd�dS1s(wYdS)Nrrzc�s��d�}|IdHSr�rr|r~rrrN7	s�
z%CAPITest.test_tp_await_3.<locals>.fooz.__await__.*returned non-iterator of type 'int'r,)r�r{rsr~rRr#rurr~r�test_tp_await_34	s�"�zCAPITest.test_tp_await_3N)rrrr�r�r�rrrrry"	s	ry�__main__)!r_rrTrr�rr9�unittestr2�testr�test.supportrr�test.support.script_helperrrrr*r0�contextmanagerr6�TestCaser8rJrZr>rPrw�cpython_onlyryrr�rrrr�<module>s\
w*�

Youez - 2016 - github.com/yon3zu
LinuXploit