+
    Bi                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIHt R t	 ! R R4      t
 ! R R]P                  4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t]R8X  d   ]P"                  ! 4        R# R# )z3Tests support for new syntax introduced by PEP 492.N)mock)utilsc                  D    \         P                  P                  R 4       R # N)asyncioevents_set_event_loop_policy     4/usr/lib/python3.14/test/test_asyncio/test_pep492.pytearDownModuler      s    NN))$/r
   c                   <   a  ] tR t^t o R tRR ltR tR tRtV t	R# )FakeCoroc                    R # r   r	   )selfvalues   &&r   sendFakeCoro.send       r
   Nc                    R # r   r	   )r   typvaltbs   &&&&r   throwFakeCoro.throw   r   r
   c                    R # r   r	   r   s   &r   closeFakeCoro.close   r   r
   c              #     "   R x  R # 5ir   r	   r   s   &r   	__await__FakeCoro.__await__   s        	r	   )NN)
__name__
__module____qualname____firstlineno__r   r   r   r    __static_attributes____classdictcell____classdict__s   @r   r   r      s      r
   r   c                   2   a a ] tR t^ t oV 3R ltRtVtV ;t# )BaseTestc                h  < \         SV `  4        \        P                  ! 4       V n        \
        P                  ! 4       V P                  n        \
        P                  ! 4       V P                  n        RV P                  P                  P                  n
        V P                  V P                  4       R # )Nr	   )supersetUpr   BaseEventLooploopr   Mock_process_events	_selectorselectreturn_valueset_event_loop)r   	__class__s   &r   r/   BaseTest.setUp"   sj    ))+	$(IIK		!"iik		24		""/DII&r
   r1   )r#   r$   r%   r&   r/   r'   r(   __classcell__)r8   r*   s   @@r   r,   r,       s     ' 'r
   r,   c                   ,   a  ] tR t^+t o R tR tRtV tR# )	LockTestsc                J  a  \         P                  ! 4       \         P                  ! 4       \         P                  ! 4       \         P                  ! 4       .pV 3R  lpV FC  pS P
                  P                  V! V4      4       S P                  VP                  4       4       KE  	  R# )c                 2  <"   \         P                  ! R 4      G Rj  xL
  SP                  V P                  4       4       T ;_uu_4       GRj  xL
 pSP	                  VR4       SP                  V P                  4       4       \         P                  ! R 4      G Rj  xL
  SP                  V P                  4       4       RRR4      GRj  xL
  SP                  V P                  4       4       R#  L L LX L+  + GRj  xL 
 '       g   i     LB; i5i){Gz?N)r   sleepassertFalselockedassertIs
assertTrue)lock_lockr   s   & r   test7LockTests.test_context_manager_async_with.<locals>.test5   s     --%%%T[[]+ttueT*.mmD))).	 t
 T[[]+ & * tttsp   DC31DC5DAC;C7#C;DC9&D5D7C;9D;D	D
D	D	DN	r   Lock	Condition	SemaphoreBoundedSemaphorer1   run_until_completerB   rC   r   
primitivesrH   	primitives   f   r   test_context_manager_async_with)LockTests.test_context_manager_async_with-   su    LLN$$&	

	, $III((i9Y--/0 $r
   c                J  a  \         P                  ! 4       \         P                  ! 4       \         P                  ! 4       \         P                  ! 4       .pV 3R  lpV FC  pS P
                  P                  V! V4      4       S P                  VP                  4       4       KE  	  R# )c           	      f  <"   \         P                  ! R 4      G Rj  xL
  SP                  V P                  4       4       SP	                  \
        R4      ;_uu_ 4        V G Rj  xL
 ;_uu_ 4         RRR4       RRR4       R#  Lh L"  + '       g   i     L; i  + '       g   i     R# ; i5i)r@   Nzcan't be awaited)r   rA   rB   rC   assertRaisesRegex	TypeError)rF   r   s   &r   rH   7LockTests.test_context_manager_with_await.<locals>.testK   s     --%%%T[[]+''"   ZZZ  	  &  ZZ	  sR   B1BAB1B%B&B2B
	4B<B1B
BBB.	(	B1NrJ   rP   s   f   r   test_context_manager_with_await)LockTests.test_context_manager_with_awaitC   su    LLN$$&	

	 $III((i9Y--/0 $r
   r	   N)r#   r$   r%   r&   rS   rZ   r'   r(   r)   s   @r   r=   r=   +   s     1,1 1r
   r=   c                   &   a  ] tR t^Zt o R tRtV tR# )StreamReaderTestsc                  a R p\         P                  ! V P                  R7      oSP                  V4       SP	                  4        V3R lpV P                  P                  V! 4       4      pV P                  V. RO4       R# )s   line1
line2
line3r:   c                  X   <"   . p S  R j  xL
  pV P                  V4       K   LDT # 5ir   )append)datalinestreams     r   reader/StreamReaderTests.test_readline.<locals>.readerc   s2     D$ " "dD!"fKs   *'%'*'*N)s   line1
s   line2
s   line3)r   StreamReaderr1   	feed_datafeed_eofrO   assertEqual)r   DATArd   ra   rc   s   &   @r   test_readlineStreamReaderTests.test_readline\   sb    %%%4995	 yy++FH5ABr
   r	   N)r#   r$   r%   r&   rk   r'   r(   r)   s   @r   r]   r]   Z   s     C Cr
   r]   c                   P   a  ] tR t^mt o R tR tR tR tR tR t	R t
R tR	tV tR
# )CoroutineTestsc                
   R  pV! 4       p V P                  \        P                  ! V4      4       VP                  4        V P                  \        P                  ! \	        4       4      4       R#   TP                  4        i ; i)c                     "   R # 5ir   r	   r	   r
   r   foo,CoroutineTests.test_iscoroutine.<locals>.foop           N)rE   r   iscoroutiner   r   )r   rq   fs   &  r   test_iscoroutineCoroutineTests.test_iscoroutineo   sW    E	OOG//23GGI++HJ78 GGIs   %A0 0Bc                `    R  pV P                  \        P                  ! V! 4       4      4       R# )c               3      "   R x  R # 5ir   r	   r	   r
   r   rq   6CoroutineTests.test_iscoroutine_generator.<locals>.foo{   s     5r"   N)rB   r   ru   r   rq   s   & r   test_iscoroutine_generator)CoroutineTests.test_iscoroutine_generatorz   s     ,,SU34r
   c                    R  pV P                  \        4      ;_uu_ 4        V P                  \        P                  ! V4      4       RRR4       R#   + '       g   i     R# ; i)c                     "   R # 5ir   r	   r	   r
   r   rq   4CoroutineTests.test_iscoroutinefunction.<locals>.foo   rs   rt   N)assertWarnsDeprecationWarningrE   r   iscoroutinefunctionr|   s   & r   test_iscoroutinefunction'CoroutineTests.test_iscoroutinefunction   s=    011OOG77<= 2111s   &AA"	c                  a R  oV3R lpV P                   P                  V! 4       4      pV P                  VR4       V P                   P                  R4       V P                   P                  V! 4       4      pV P                  VR4       R# )c                     "   R # 5i)spamr	   r	   r
   r   bar5CoroutineTests.test_async_def_coroutines.<locals>.bar   s     rt   c                  .   <"   S ! 4       G R j  xL
 #  L5ir   r	   )r   s   r   rq   5CoroutineTests.test_async_def_coroutines.<locals>.foo   s     ;;s   r   TN)r1   rO   ri   	set_debug)r   rq   ra   r   s   &  @r   test_async_def_coroutines(CoroutineTests.test_async_def_coroutines   so    		 yy++CE2v& 			D!yy++CE2v&r
   c                  a  V 3R  lpS P                  \        P                  ! 4       ^ 4       S P                  P	                  R4       S P                  P                  V! 4       4       S P                  \        P                  ! 4       ^ 4       R# )c                  ^   <"   S P                  \        P                  ! 4       ^ 8  4       R# 5i    N)rE   sys#get_coroutine_origin_tracking_depthr   s   r   startOCoroutineTests.test_debug_mode_manages_coroutine_origin_tracking.<locals>.start   s      OOCCCEIJs   *-TN)ri   r   r   r1   r   rO   )r   r   s   f r   1test_debug_mode_manages_coroutine_origin_tracking@CoroutineTests.test_debug_mode_manages_coroutine_origin_tracking   sc    	K 	@@BAF		D!		$$UW-@@BAFr
   c                   a aa R  o\         P                  V3R l4       oVV 3R lpS P                  P                  V! 4       4      pS P	                  VR4       R# )c               3   &   "   R R j  xL
  R#  L5i)Nr   r	   r	   r	   r
   r   gen0CoroutineTests.test_types_coroutine.<locals>.gen   s     MM s   c                     < S ! 4       # r   r	   )r   s   r   func1CoroutineTests.test_types_coroutine.<locals>.func   s
    5Lr
   c                  r   <"   S! 4       p SP                  V \        P                  4       V G R j  xL
 #  L5ir   )assertIsInstancetypes_GeneratorWrapper)wrapperr   r   s    r   coro1CoroutineTests.test_types_coroutine.<locals>.coro   s-     fG!!'5+B+BC = =s   -757r   N)r   	coroutiner1   rO   ri   )r   r   ra   r   r   s   f  @@r   test_types_coroutine#CoroutineTests.test_types_coroutine   sM    	 
	 
		!
 yy++DF3v&r
   c                n   a aa R oVV 3R loVVV 3R lpS P                   P                  V! 4       4       R # )Nc                     <"   SP                  ^R7      p  SP                  V ^ ,          P                  P                  R4       Rp R#   Rp i ; i5i)   )limitrq   N)	get_stackri   f_codeco_name)rv   Tr   s    r   rq   1CoroutineTests.test_task_print_stack.<locals>.foo   sC     !$A  1!4!4e<Ds   A-A AAAc                  v   <"   \         P                  ! S! 4       SP                  R 7      o S G Rj  xL
  R#  L5i)r:   N)r   ensure_futurer1   )r   rq   r   s   r   runner4CoroutineTests.test_task_print_stack.<locals>.runner   s%     %%ce$))<AGGs   -979)r1   rO   )r   r   r   rq   s   f @@r   test_task_print_stack$CoroutineTests.test_task_print_stack   s(    		
 			$$VX.r
   c                  a a R  oVV 3R lpS P                   P                  R4       S P                  \        RR7      ;_uu_ 4        S P                   P	                  V! 4       4       RRR4       R#   + '       g   i     R# ; i)c                  N   "   \         P                  ! R 4      G Rj  xL
  R#  L5i)g?N)r   rA   r	   r
   r   afunc/CoroutineTests.test_double_await.<locals>.afunc   s     --$$$s   %#%c                     <"   S! 4       p SP                   P                  V 4      p \        P                  ! ^ 4      G Rj  xL
  V G Rj  xL
  VP	                  4        R#  L  L  TP	                  4        i ; i5ir   )r1   create_taskr   rA   cancel)r   tr   r   s     r   r   0CoroutineTests.test_double_await.<locals>.runner   sZ     7D		%%d+AmmA&&&


 '
s@   #A:A%  A!	A% 
A#A% A:!A% #A% %A77A:Tz"coroutine is being awaited already)msgN)r1   r   assertRaisesRuntimeErrorrO   )r   r   r   s   f @r   test_double_await CoroutineTests.test_double_await   sj    	%	 			D!8  : : II((2	: : : :s   !A22B	r	   N)r#   r$   r%   r&   rw   r}   r   r   r   r   r   r   r'   r(   r)   s   @r   rn   rn   m   s3     	95
>
'G'"/"3 3r
   rn   __main__)__doc__r   r   unittestr   r   test.test_asyncior   
test_utilsr   r   TestCaser,   r=   r]   rn   r#   mainr	   r
   r   <module>r      s}    9 
     10
 'z"" ',1 ,1^C C&c3X c3L zMMO r
   