o
    tPf`                     @   sp  d dl mZ d dlmZmZ d dlZd dlZd dlZd dlZd dlZ	d dlm
Z
 d dl	Z	d dlmZ d dlmZ d dlmZ d dlmZ ejdd	 ZG d
d dejZG dd deZG dd deZdCddZdd Zd\ZZZG dd deZdZdZejrej sej!sej"rdZG dd deZ#G dd de#Z$ej%G dd  d e#Z&ej%G d!d" d"e#Z'G d#d$ d$eZ(G d%d& d&eZ)d'd( Z*G d)d* d*eZ+G d+d, d,eZ,G d-d. d.eZ-G d/d0 d0eZ.G d1d2 d2eZ/G d3d4 d4eZ0d5d6 Z1G d7d8 d8eZ2d d9l	m3Z3 e4e5e	j6d:d;G d<d= d=eZ7G d>d? d?ejZ8G d@dA dAeZ9e:dBkr6e;  dS dS )D    )print_function)timesleepN)
ThreadPool)InvalidThreadUseErrorExpectedException)PYPYc                  c   s@    t  } t   zd V  W | rt   d S d S | rt   w w N)gc	isenableddisableenable)was_enabled r   ^/var/www/html/humari/django-venv/lib/python3.10/site-packages/gevent/tests/test__threadpool.pydisabled_gc   s   
r   c                   @   s<   e Zd ZejZdZdZeZ	dd Z
ejfddZdd ZdS )	TestCaseNr   c                 C   s   | j S r
   )ClassUnderTestselfr   r   r   _FUT*      zTestCase._FUTc                 C   s2   |   | | _}|  j|f7  _|r|| j_|S r
   )r   pool
_all_poolssize)r   maxsizecreate_all_worker_threadsr   r   r   r   _makeOne-   s
   zTestCase._makeOnec                 C   s`   d | _ | jd}| _|D ]}t|dd pt|d}|  ~qtjr,tdD ]}t  q%d S d S )Nr   killshutdown   )r   r   getattr	greentestRUN_LEAKCHECKSranger   collect)r   	all_poolsr   r   _r   r   r   cleanup5   s   
zTestCase.cleanup)__name__
__module____qualname__r#   LARGE_TIMEOUT__timeout__r   r   r   r   r   r$   r   r)   r   r   r   r   r   #   s    r   c                   @   s2   e Zd Zdd Zdd Zdd Zde_dd	 Zd
S )PoolBasicTestsc                 C   s   |  d}g }||jd}|  | |dg td ||jd | |dg ||jd | |dg ||jd | |dg td | t	|g d d S )	N      r   )r0   )r!   )   {Gz?)r1   r0   r!   r2   )
r   spawnappendgetassertEqualgeventr   apply_asyncassertEqualFlakyRaceConditionsorted)r   r   rfirstr   r   r   test_execute_asyncI   s   


z!PoolBasicTests.test_execute_asyncc                 C   s*   |  d}|dd d}| |d d S )Nr1   c                 S   s   d| fS )Nfoor   )ar   r   r   <lambda>^   s    z+PoolBasicTests.test_apply.<locals>.<lambda>)r1   )r?   r1   )r   applyr7   )r   r   resultr   r   r   
test_apply\   s   
zPoolBasicTests.test_applyc                 C   sL   |  d}dd }| t || W d    d S 1 sw   Y  d S )Nr1   c                   S   s   t  r
   r   r   r   r   r   raiserd   r   z0PoolBasicTests.test_apply_raises.<locals>.raiser)r   assertRaisesr   rB   )r   r   rE   r   r   r   test_apply_raisesa   s
   
"z PoolBasicTests.test_apply_raisesFc                 C   s@   d| _ | t | d W d    d S 1 sw   Y  d S )NF)switch_expectedrF   
ValueErrorr   r   r   r   r   test_init_valueerrorn   s   "z#PoolBasicTests.test_init_valueerrorN)r*   r+   r,   r>   rD   rG   error_fatalrK   r   r   r   r   r/   G   s    r/   c                   @   s   e Zd Zdd Zdd ZdS )TimingWrapperc                 C   s   || _ d | _d S r
   )funcelapsed)r   the_funcr   r   r   __init__y   s   
zTimingWrapper.__init__c                 O   s4   t  }z| j|i |W t  | | _S t  | | _w r
   )r   rN   rO   )r   argskwdstr   r   r   __call__}   s   zTimingWrapper.__call__N)r*   r+   r,   rQ   rU   r   r   r   r   rM   w   s    rM           c                 C   s   t | | |  S r
   )r   )xwaitr   r   r   sqr   s   rY   c                 C   s   t t d  | |  S )N皙?)r   randomrW   r   r   r   sqr_random_sleep      r]   )gˡE?gQ?gQ?c                   @   s*   e Zd ZdZdZdd Zejdd ZdS )_AbstractPoolTestr1   Fc                 C   s   t j|  | | j d S r
   )r#   r   setUpr   r   r   r   r   r   r`      s   z_AbstractPoolTest.setUpc                    sv    j j} jr fdd} |ttdttttd  |ttdttttd  j    ` ~d S )Nc                    s   t  j| |S r
   )listr   map)fir   r   r   rA          z,_AbstractPoolTest.test_map.<locals>.<lambda>
   d   )r   rb   
MAP_IS_GENr7   rY   r%   ra   r   )r   pmapr   r   r   test_map   s   $$
z_AbstractPoolTest.test_mapN)	r*   r+   r,   r   rh   r`   r#   ignores_leakcheckrj   r   r   r   r   r_      s    r_   rf   i  2   c                   @   s   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd  Zd!S )"TestPoolc                 C   s   ddl m} ddlm} | j|}| || t|}| d| | d| | d| ddl	m
} d| }| d	| d S )
Nr   )
getcurrent)_WorkerGreenletThreadPoolWorkerthread_identzhub=)format_run_info
z<ThreadPoolWorker)greenletrn   gevent.threadpoolro   r   rB   assertIsInstancereprassertIngevent.utilrr   join)r   rn   ro   worker_greenletr<   rr   infor   r   r   test_greenlet_class   s   zTestPool.test_greenlet_classc                 C   s@   | j j}| |tdtd | |tddditdd d S )N)   r~   r   rW   r!   r\   )r   rB   r7   rY   )r   papplyr   r   r   rD      s   "zTestPool.test_applyc                 C   s>   | j tdtf}t|j}| | d | |jtd d S )N   1   r1   )	r   r9   rY   TIMEOUT1rM   r6   r7   assertTimeoutAlmostEqualrO   r   resr6   r   r   r   
test_async   s   
zTestPool.test_asyncc                 C   s`   g }| j jtdtf|jd}t|j}| | d | |j	td t
d | |dg d S )Nr   )callbackr   r1   r   )r   r9   rY   r   r5   rM   r6   r7   r   rO   r8   r   )r   rC   r   r6   r   r   r   test_async_callback   s   

zTestPool.test_async_callbackc                 C   sP   | j tdtd f}t|j}| jtj|td | 	|j
td | j   d S )N   皙?timeoutr1   )r   r9   rY   TIMEOUT2rM   r6   rF   r8   Timeoutr   rO   rz   r   r   r   r   test_async_timeout   s
   
zTestPool.test_async_timeoutc                 C   s4   | j ttt}| t|ttttt d S r
   )r   imaprY   r%   SMALL_RANGEr7   ra   rb   r   itr   r   r   test_imap_list_small      "zTestPool.test_imap_list_smallc                 C   F   | j ttt}ttD ]}| t|||  q| tt| d S r
   )	r   r   rY   r%   r   r7   nextrF   StopIterationr   r   rd   r   r   r   test_imap_it_small      zTestPool.test_imap_it_smallc                 C   r   r
   )	r   r   rY   r%   LARGE_RANGEr7   r   rF   r   r   r   r   r   test_imap_it_large   r   zTestPool.test_imap_it_largec                 C   sN   | j ttt}ttD ]}| t|||  t  q| 	t
t| d S r
   )r   r   rY   r%   r   r7   r   r   r&   rF   r   r   r   r   r   test_imap_gc   s
   
zTestPool.test_imap_gcc                 C   s   | j ttt}g }ttD ]}|t| t  q| 	t
 t| W d    n1 s1w   Y  | t|dd ttD  d S )Nc                 S   s   g | ]}|| qS r   r   .0rW   r   r   r   
<listcomp>   s    z3TestPool.test_imap_unordered_gc.<locals>.<listcomp>)r   imap_unorderedrY   r%   r   r5   r   r   r&   rF   r   r7   r;   )r   r   rC   r(   r   r   r   test_imap_unordered_gc   s   

"zTestPool.test_imap_unordered_gcc                 C   s4   | j ttt}| t|ttttt d S r
   )	r   r   r]   r%   r   r7   ra   rb   rY   r   r   r   r   test_imap_random  r   zTestPool.test_imap_randomc                 C   sd   | j ttt}| t|ttttt | j ttt}| t|ttttt d S r
   )	r   r   rY   r%   r   r7   r;   ra   rb   r   r   r   r   test_imap_unordered  s   "zTestPool.test_imap_unorderedc                 C   s4   | j ttt}| t|ttt	tt d S r
   )
r   r   r]   r%   r   r7   r;   ra   rb   rY   r   r   r   r   test_imap_unordered_random  r   z#TestPool.test_imap_unordered_randomc                 C   s   | j pd}| jtdg|d  }td z/| jd| j  d dd | j  W d    n1 s3w   Y  W |  d S W |  d S |  w )Nrf   rZ   r0         ?r   )min_time)r   r   	map_asyncr   r8   runs_in_given_timer   rz   )r   r   rC   r   r   r   test_terminate  s   

zTestPool.test_terminatec                 C   s   t t|d  t|S )Ng      $@)r   floatstr)r   rW   r   r   r   r     r^   zTestPool.sleepc                 C   sF   t | j| jg d}| jjdkrg d}ng d}| || d S )N)rf   r1   r0   r1   )1012)r   r   r   )ra   r   r   r   r   r7   )r   rC   expectedr   r   r   test_imap_unordered_sleep  s
   
z"TestPool.test_imap_unordered_sleepN)r*   r+   r,   r}   rD   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rm      s"    	

rm   c                   @   s   e Zd ZdZejdd ZdS )	TestPool2r0   c                    s6   | j  fdd}dd  |}| |d d S )Nc                      s
     S r
   )rB   r   bpr   r   r@   /  s   
z)TestPool2.test_recursive_apply.<locals>.ac                   S   s   t   t d dS )NMbP?Br8   r   r   r   r   r   r   2  s   
z)TestPool2.test_recursive_apply.<locals>.br   )r   rB   r7   )r   r@   rC   r   r   r   test_recursive_apply+  s
   
zTestPool2.test_recursive_applyN)r*   r+   r,   r   r#   rk   r   r   r   r   r   r   (  s    r   c                   @      e Zd ZdZdS )	TestPool3r!   Nr*   r+   r,   r   r   r   r   r   r   >      r   c                   @   r   )
TestPool10rf   Nr   r   r   r   r   r   B  r   r   c                   @   s2   e Zd ZdZeejoejoejddd Z	dS )TestJoinEmptyFzqThis sometimes appears to crash in PyPy2 5.9.0, but never crashes on macOS or local Ubunto with same PyPy versionc                 C   s   |  d}|  d S Nr1   )r   rz   r   r   r   r   r   test[  s   
zTestJoinEmpty.testN)
r*   r+   r,   rI   r#   skipIfr	   LIBUVRUNNING_ON_TRAVISr   r   r   r   r   r   X  s    r   c                   @   s,   e Zd ZdZejdd Zejdd ZdS )	TestSpawnTc                    s   |  d}| t|d g   fdd}||dd | t|d ||dd | t|d td	 |  dg | t|d td	 |  ddg | t|d d S )
Nr1   r   c                    s   t | | gS r
   )r   r5   )itemsecondslogr   r   rA   m  re   z'TestSpawn.test_basics.<locals>.<lambda>r@   rZ   r   r0   g333333?)r   r7   lenr4   r8   r   )r   r   sleep_n_logr   r   r   test_basicsh  s   


zTestSpawn.test_basicsc                    sb   |  d}|  d  fdd}||}| t |  W d    d S 1 s*w   Y  d S )Nr1   r0   c                      s     dd  d S )Nc                   S      dS )NHir   r   r   r   r   rA         zMTestSpawn.test_cannot_spawn_from_other_thread.<locals>.func.<locals>.<lambda>)r4   r   pool2r   r   rN     s   z;TestSpawn.test_cannot_spawn_from_other_thread.<locals>.func)r   r4   rF   r   r6   )r   pool1rN   r   r   r   r   #test_cannot_spawn_from_other_thread{  s   



"z-TestSpawn.test_cannot_spawn_from_other_threadN)r*   r+   r,   rI   r#   rk   r   r   r   r   r   r   r   e  s    
r   c                   c   s    dV  dV  t j)Nr1   r0   )r#   r   r   r   r   r   
error_iter  s   r   c                   @   s    e Zd ZdZdd Zdd ZdS )TestErrorInIteratorFc                 C   s6   |  d| _| tj| jjdd t  td d S )Nr!   c                 S      d S r
   r   r\   r   r   r   rA     r   z*TestErrorInIterator.test.<locals>.<lambda>r   )	r   r   rF   r#   r   rb   r   r8   r   r   r   r   r   r     s   zTestErrorInIterator.testc                    s4     d _ fdd} tj| td d S )Nr!   c                      s   t  jdd t S )Nc                 S   r   r
   r   r\   r   r   r   rA     r   zGTestErrorInIterator.test_unordered.<locals>.unordered.<locals>.<lambda>)ra   r   r   r   r   r   r   r   	unordered  s   z5TestErrorInIterator.test_unordered.<locals>.unorderedr   )r   r   rF   r#   r   r8   r   )r   r   r   r   r   test_unordered  s   z"TestErrorInIterator.test_unorderedN)r*   r+   r,   rL   r   r   r   r   r   r   r     s    r   c                   @   s"   e Zd Zdd Zejdd ZdS )TestMaxsizec                 C   sv   |  d| _g }t| jj|jd td| jj|jd td | |g  d| j_td | 	|ddg d S )Nr   r1   r3   r0   g{Gz?)
r   r   r8   r4   r5   spawn_laterr   r7   r   r:   )r   doner   r   r   test_inc  s   

zTestMaxsize.test_incc                 C   sn   |  d }| _|td |td |td td | |jd d|_td | |jd d S )Nr!   rZ   r   g333333?r0   r   )	r   r   r4   r   r8   assertGreaterEqualr   r   r:   r   r   r   r   test_setzero  s   

zTestMaxsize.test_setzeroN)r*   r+   r,   r   r#   rk   r   r   r   r   r   r     s    r   c                   @   s   e Zd Ze dd ZdS )TestSizec                 C   s   | j ddd }| _| |jd d|_| |jd d|_| |jd d|_| |jd | t d|_W d    n1 sBw   Y  | t d|_W d    n1 sZw   Y  d|_| |jd d|_| |jd d S )Nr0   Fr   r   r1   rH   r!   )r   r   r7   r   rF   rJ   r   r   r   r   r     s$   zTestSize.testN)r*   r+   r,   r#   reraises_flaky_race_conditionr   r   r   r   r   r     s    r   c                   @      e Zd Zdd ZdS )TestRefc                 C   s   |  d }| _g }t }||_|j}~t G ||t fdt i}| |t t	
d |t| ~~trCt  t  |D ]}| |  qE| dt| W d    d S 1 saw   Y  d S )Nr0   kwarg1rZ   r2   )r   r   	SomeClassrefsrN   r   rB   Objectrv   r8   r   r5   weakrefrefr	   r   r&   assertIsNoner7   r   )r   r   r   objrN   rC   r<   r   r   r   r     s&   
"zTestRef.testNr*   r+   r,   r   r   r   r   r   r         r   c                   @      e Zd ZdS )r   Nr*   r+   r,   r   r   r   r   r         r   c                   @   s   e Zd ZdZdddZdS )r   Nc                 C   s&   t  }| jdd |||fD  |S )Nc                 S   s   g | ]}t |qS r   )r   r   r   r   r   r   r     s    z"SomeClass.func.<locals>.<listcomp>)r   r   extend)r   arg1r   rC   r   r   r   rN     s   zSomeClass.funcr
   )r*   r+   r,   r   rN   r   r   r   r   r     s    r   c                   C   r   r
   r   r   r   r   r   noop     r   c                   @   r   )TestRefCountc                 C   s*   |  d}|t td |  d S )Nr1   r   )r   r4   r   r8   r   r   r   r   r   r   r     s   


zTestRefCount.testNr   r   r   r   r   r   	  r   r   )monkeyThreadPoolExecutorzRequires ThreadPoolExecutorc                   @   sr   e Zd ZdZdZedd ZdZedd Zedd	 Z	ed
d Z
ejdd Zejdd Zejdd ZdS )TestTPEr1   Tc                 C   s   t jjS r
   )r8   
threadpoolr   r   r   r   r   r     s   zTestTPE.ClassUnderTestFc                 C      ddl m} |S )Nr   )TimeoutError)concurrent.futuresr   )r   FutureTimeoutErrorr   r   r   r   #     zTestTPE.FutureTimeoutErrorc                 C   r   )Nr   )rX   )r   rX   )r   cf_waitr   r   r   r  (  r   zTestTPE.cf_waitc                 C   r   )Nr   )as_completed)r   r  )r   cf_as_completedr   r   r   r  -  r   zTestTPE.cf_as_completedc           	         s`  |  td| j | j}g  dd }dd }||}d|_|| | j| j	|j
dd d	d
 }t|}|  |
 d | |  | |  t  |  |jd | |  |  |jd | fdd |   dg | |f\}}|  t||g |  t| |f|g |  |jd t  |  |jd |  ~~| `d S )N	threadingc                   S      t d dS Nr   *   r   r   r   r   r   fn:     
zTestTPE.test_future.<locals>.fnc                 S   s   |  j d7  _ td)Nr1   zExpected, ignored)
calledbackr#   r   )futurer   r   r   r   >  s   
z%TestTPE.test_future.<locals>.callbackr   r   r   c                   S   r   N  r   r   r   r   r   spawnedG  r   z$TestTPE.test_future.<locals>.spawnedr  r1   r  c                    s
     dS )NTr5   )rc   r
  r   r   rA   [  s   
 z%TestTPE.test_future.<locals>.<lambda>T)r7   r   is_module_patchedMONKEY_PATCHEDr   submitr
  add_done_callbackrF   r   rC   r8   r4   
assertTruer   assertFalse	cancelledr   readyvaluer  ra   r  r   )	r   r   r  r   r  r  spawned_greenletr   	_not_doner   r  r   test_future2  s@   


zTestTPE.test_futurec           
      C   s   |  td| j | j}dd }||}| jrU| j|fdd\}}|  t||g dd }t	|}| |f\}}	|  t||g | 
|  |  |jd n	| t| j|f |  ~~| `d S )	Nr  c                   S   r  r  r   r   r   r   r   r  v  r	  z4TestTPE.test_future_wait_module_function.<locals>.fnr   r   c                   S   r   r  r   r   r   r   r   r    r   z9TestTPE.test_future_wait_module_function.<locals>.spawnedr  )r7   r   r  r  r   r  r  ra   r8   r4   r  r  r  rF   AttributeErrorr   )
r   r   r  r  _donenot_doner  r  r   r  r   r   r    test_future_wait_module_functionn  s(   

z(TestTPE.test_future_wait_module_functionc                 C   s   |  td| j | j}dd }||}dd }t|}t|f}|  t	||g | 
|  |  |jd |  ~~| `d S )Nr  c                   S   r  r  r   r   r   r   r   r    r	  z4TestTPE.test_future_wait_gevent_function.<locals>.fnc                   S   r   r  r   r   r   r   r   r    r   z9TestTPE.test_future_wait_gevent_function.<locals>.spawnedr  )r7   r   r  r  r   r  r8   r4   rX   ra   r  r  r  r   )r   r   r  r  r  r  r   r   r   r    test_future_wait_gevent_function  s    

z(TestTPE.test_future_wait_gevent_functionN)r*   r+   r,   r   rh   propertyr   r  r   r  r  r#   rk   r  r   r!  r   r   r   r   r     s$    




;
#r   c                   @   r   )TestThreadResultc                    s   g G dd dt   fdd}tjd t |fdd}t|  |   tdD ]}t	d q3W d    n1 sEw   Y  | 
d	d	g | j | j d S )
Nc                   @   r   )zMTestThreadResult.test_exception_in_on_async_doesnt_crash.<locals>.MyExceptionNr   r   r   r   r   MyException  r   r$  c                      s    d  r   r  r   )r$  calledr   r   bad_when_ready  r	  zPTestThreadResult.test_exception_in_on_async_doesnt_crash.<locals>.bad_when_readyc                      s     d d d S )Nr1   r  )r5   setr   )r%  trr   r   wake  s   
zFTestThreadResult.test_exception_in_on_async_doesnt_crash.<locals>.waker~   r   r1   )	Exceptionr8   r   ThreadResultget_hubr4   r6   rF   r%   r   r7   r   r  assertIsNotNonereceiver)r   r&  r)  r(   r   )r$  r%  r(  r   'test_exception_in_on_async_doesnt_crash  s   z8TestThreadResult.test_exception_in_on_async_doesnt_crashN)r*   r+   r,   r/  r   r   r   r   r#    r   r#  c                       sX   e Zd ZdZdZ fddZ fddZdd Zdd	 Zd
d Z	dd Z
dd Z  ZS )TestWorkerProfileAndTraceNc                    s*   t t|   tj | _tj | _d S r
   )	superr0  r`   r8   r   _get_thread_profileold_profile_get_thread_trace	old_tracer   	__class__r   r   r`     s   zTestWorkerProfileAndTrace.setUpc                    s2   dd l }|| j || j tt|   d S Nr   )r  
setprofiler3  settracer5  r1  r0  tearDownr   r  r6  r   r   r;    s   z"TestWorkerProfileAndTrace.tearDownc                 C   (   dd l }||  | tj |  d S r8  )r  r9  assertIsr8   r   r2  r<  r   r   r   test_get_profile     
z*TestWorkerProfileAndTrace.test_get_profilec                 C   r=  r8  )r  r:  r>  r8   r   r4  r<  r   r   r   test_get_trace  r@  z(TestWorkerProfileAndTrace.test_get_tracec           
         s   dd l }dd l}t|d| }t|d| dgfdd}fdd}g g  | G  fdd	d	t}|| _| jd
dd}t||sIJ || ||}	| |	d | 	d d
 |
  | |d |g |  ||d g d S )Nr   r'  r6   c                     s    d  d7  < d S )Nr   r1   r   )_args)r%  r   r   r     s   zETestWorkerProfileAndTrace._test_func_called_in_task.<locals>.callbackc                      s      dS )N  )r-  r   )getterr   r   r   task  r	  zATestWorkerProfileAndTrace._test_func_called_in_task.<locals>.taskc                       s&   e Zd ZG  fdddejZdS )zATestWorkerProfileAndTrace._test_func_called_in_task.<locals>.Poolc                       s(   e Zd ZfddZ fddZdS )zQTestWorkerProfileAndTrace._test_func_called_in_task.<locals>.Pool._WorkerGreenletc                    <     |     tjj| |g|R       d S r
   )r5   r   ro   _before_run_taskr   rN   rR   )before_taskrD  r   r   rG       
zbTestWorkerProfileAndTrace._test_func_called_in_task.<locals>.Pool._WorkerGreenlet._before_run_taskc                    rF  r
   )r5   r   ro   _after_run_taskrH  )
after_taskrD  r   r   rK    rJ  zaTestWorkerProfileAndTrace._test_func_called_in_task.<locals>.Pool._WorkerGreenlet._after_run_taskN)r*   r+   r,   rG  rK  r   rL  rI  rD  r   r   ro     s    ro   N)r*   r+   r,   r   ro   r   rM  r   r   Pool  s    rN  r1   Tr   rC  )r  sysr"   r   r   r   
isinstancerB   r7   r   r   )
r   rN   r  rO  setterr   rE  rN  r   r   r   )rL  rI  r%  rD  r   r   _test_func_called_in_task  s*   

z3TestWorkerProfileAndTrace._test_func_called_in_taskc                 C      |  d d S )NprofilerR  r   r   r   r   test_profile_called_in_task0     z5TestWorkerProfileAndTrace.test_profile_called_in_taskc                 C   rS  )NtracerU  r   r   r   r   test_trace_called_in_task3  rW  z3TestWorkerProfileAndTrace.test_trace_called_in_task)r*   r+   r,   r3  r5  r`   r;  r?  rA  rR  rV  rY  __classcell__r   r   r6  r   r0    s    ?r0  __main__)rV   )<
__future__r   r   r   
contextlibr[   r   r   ru   r8   r   gevent.exceptionsr   gevent.testingtestingr#   r   r	   contextmanagerr   r   r/   objectrM   rY   r]   r   r   TIMEOUT3r_   r   r   WINRUN_COVERAGEr$   rm   r   rk   r   r   r   r   r   r   r   r   r   r   r   r   r   r   
skipUnlesshasattrr   r   r#  r0  r*   mainr   r   r   r   <module>   sn    

$0

u%


 %
d