a
    zeQs                     @   s   d Z ddlZddlmZ ddlZddlZdZeeZdd ZG dd dej	Z
G d	d
 d
ej	ZG dd dej	ZG dd dej	Zedkre  dS )zTests for lock.py    N)mockzv^<(?P<class>.*?) object at (?P<address>.*?)\[(?P<extras>(set|unset|locked|unlocked)(, value:\d)?(, waiters:\d+)?)\]>\Zc                   C   s   t d  d S N)asyncioZset_event_loop_policy r   r   2/usr/lib/python3.9/test/test_asyncio/test_locks.pytearDownModule   s    r   c                   @   st   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S )	LockTestsc                    s   t  }| t tj|d}W d    n1 s40    Y  | |j| | t  tjt d}W d    n1 s|0    Y  | |jt  d S Nloop)	r   MockassertWarnsDeprecationWarningr   LockassertIs_loopget_running_loop)selfr   lockr   r   r   test_ctor_loop   s    *.zLockTests.test_ctor_loopc                    s   t  }| |jt   d S r   )r   r   r   r   r   r   r   r   r   r   test_ctor_noloop"   s    zLockTests.test_ctor_noloopc                    s   |  t  tjt d}W d    n1 s00    Y  | t|d | t	t| |
 I d H  | t|d | t	t| d S )Nr
   z[unlocked]>	[locked]>)r   r   r   r   r   
assertTruereprendswithRGX_REPRmatchacquirer   r   r   r   	test_repr&   s    .zLockTests.test_reprc                    sP   t  }| td |I d H  W d    n1 s40    Y  | |  d S )Nz/object Lock can't be used in 'await' expression)r   r   assertRaisesRegex	TypeErrorassertFalselockedr   r   r   r   	test_lock0   s    (zLockTests.test_lockc              
      s   t  t  t  t  g}|D ]}t dI d H  | |  | t	d: |I d H  W d    n1 sp0    Y  W d    n1 s0    Y  | |  q d S )N{Gz?z.object \w+ can't be used in 'await' expression)
r   r   	Condition	SemaphoreBoundedSemaphoresleepr"   r#   r    r!   )r   Z
primitivesr   r   r   r   test_lock_by_with_statement;   s    <z%LockTests.test_lock_by_with_statementc                    sv  t   g }|   I d H   fdd} fdd} fdd}t ||}t ||}t dI d H  | g |    t dI d H  | dg| t dI d H  | dg| t ||}   t dI d H  | dd	g|    t dI d H  | g d
| | |  | |	  | |  | |	  | |  | |	  d S )Nc                    s      I d H r| d dS N   Tr   appendresultr   r   r   c1T   s    
z"LockTests.test_acquire.<locals>.c1c                    s      I d H r| d dS N   Tr-   r/   r1   r   r   c2Y   s    
z"LockTests.test_acquire.<locals>.c2c                    s      I d H r| d dS N   Tr-   r/   r1   r   r   c3^   s    
z"LockTests.test_acquire.<locals>.c3r   r,   r4   r,   r4   r7   )
r   r   r   r   create_taskr)   assertEqualreleasedoner0   r   r0   r2   r5   r8   t1t2t3r   r1   r   test_acquireN   s8    zLockTests.test_acquirec                    s   |  t  tjt d}W d    n1 s00    Y  | | I d H  t| }t |j	 | 
tj |I d H  W d    n1 s0    Y  | |j d S r	   )r   r   r   r   r   r   r   r:   	call_sooncancelassertRaisesCancelledErrorr"   _waiters)r   r   Ztaskr   r   r   test_acquire_cancel   s    .(zLockTests.test_acquire_cancelc                    sR  |  t  tjt d W d    n1 s00    Y   fdd}t  }t|d|}tdI d H  |  	  t|dd }tdI d H  | 
t jd t|dd }tdI d H  | 
t jd	 |d  |  |  jd   tdI d H  |  	  | |  | |  |I d H  d S )
Nr
   c                    s<      I d H  z|d ur"|I d H  W    n
   0 d S r   )r   r<   )nameZblockerr1   r   r   lockit   s
    z*LockTests.test_cancel_race.<locals>.lockitAr   Br,   Cr4   )r   r   r   r   r   Zcreate_futurer:   r)   r   r#   r;   lenrG   
set_resultrD   	cancelledr"   r=   )r   rJ   fatatbtcr   r1   r   test_cancel_race   s*    .
zLockTests.test_cancel_racec                    s@  t  }| t t j|dW d    n1 s40    Y  dd  fdd}fdd} I d H  t | t | }t | }t dI d H  || | 	t j
 I d H  W d    n1 s0    Y  | d |  d |  o|  |  t dI d H  | |  d S )	Nr
   r   c                      s"    d7    I d H  d7 d S Nr,   )r   r   )
call_countr   
lock_countr   r   rJ      s    z2LockTests.test_cancel_release_race.<locals>.lockitc                      s         d S r   )rD   r<   r   )r   r?   r   r   trigger   s    z3LockTests.test_cancel_release_race.<locals>.triggerr,   r7   )r   r   r   r   r   r   r:   r)   rC   rE   rF   r;   r   rP   r=   rD   )r   r   rJ   rY   r@   rA   r   )rW   r   rX   r?   r   test_cancel_release_race   s*    *
(z"LockTests.test_cancel_release_racec                    s   |  t  tjt d}W d    n1 s00    Y  | I d H  | |  t| }t	dI d H  | 
t|jd t| }|  |  t	dI d H  | |  | |  |I d H  d S )Nr
   r   r,   )r   r   r   r   r   r   r   r#   r:   r)   r;   rN   rG   rD   r<   rP   )r   r   rS   rT   r   r   r   test_finished_waiter_cancelled   s    .z(LockTests.test_finished_waiter_cancelledc                    sL   |  t  tjt d}W d    n1 s00    Y  | t|j d S r	   )r   r   r   r   r   rE   RuntimeErrorr<   r   r   r   r   test_release_not_acquired  s    .z#LockTests.test_release_not_acquiredc                    sp   |  t  tjt d}W d    n1 s00    Y  | I d H  | |  |  | 	|  d S r	   )
r   r   r   r   r   r   r   r#   r<   r"   r   r   r   r   test_release_no_waiters  s    .z!LockTests.test_release_no_waitersc              	      sn   t  }| |  |4 I d H $ | |  W d   I d H  q\1 I d H sR0    Y  | |  d S r   )r   r   r"   r#   r   r   r   r   r   test_context_manager  s
    8zLockTests.test_context_managerN)__name__
__module____qualname__r   r   r   r$   r*   rB   rH   rU   rZ   r[   r]   r^   r_   r   r   r   r   r      s   

30.	r   c                   @   sL   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S )
EventTestsc                    s   t  }| t tj|d}W d    n1 s40    Y  | |j| | t  tjt d}W d    n1 s|0    Y  | |jt  d S r	   )	r   r   r   r   r   Eventr   r   r   )r   r   evr   r   r   r     s    *.zEventTests.test_ctor_loopc                    s,   t t   t  }| |jt   d S r   )r   Zset_event_loopr   rd   r   r   r   re   r   r   r   r   '  s    zEventTests.test_ctor_noloopc                    s   |  t  tjt d}W d    n1 s00    Y  | t|d t	t|}| 
|dd |  | t|d | t	t| |jt  | dt|v  | t	t| d S )Nr
   z[unset]>extrasZunsetz[set]>	waiters:1)r   r   r   rd   r   r   r   r   r   r   r;   groupsetrG   r.   r   r   )r   re   r   r   r   r   r   ,  s    .zEventTests.test_reprc                    s6  |  t  tjt d W d    n1 s00    Y  |    g } fdd} fdd} fdd}t||}t||}tdI d H  | 	g | t||} 
  tdI d H  | 	g d	| | |  | |  | |  | |  | |  | |  d S )
Nr
   c                    s      I d H r| d d S rV   waitr.   r/   re   r   r   r2   B  s    z EventTests.test_wait.<locals>.c1c                    s      I d H r| d d S )Nr4   rk   r/   rm   r   r   r5   F  s    z EventTests.test_wait.<locals>.c2c                    s      I d H r| d d S )Nr7   rk   r/   rm   r   r   r8   J  s    z EventTests.test_wait.<locals>.c3r   )r7   r,   r4   )r   r   r   rd   r   r"   is_setr:   r)   r;   rj   r   r=   ZassertIsNoner0   r>   r   rm   r   	test_wait;  s*    .zEventTests.test_waitc                    s,   t  }|  | I d H }| | d S r   )r   rd   rj   rl   r   )r   re   resr   r   r   test_wait_on_seta  s    zEventTests.test_wait_on_setc                    sl   t  }t | }t  |j | t j |I d H  W d    n1 sR0    Y  | 	|j
 d S r   )r   rd   r:   rl   r   rC   rD   rE   rF   r"   rG   )r   re   rl   r   r   r   test_wait_cancelh  s    (zEventTests.test_wait_cancelc                    sF   t  }| |  |  | |  |  | |  d S r   )r   rd   r"   rn   rj   r   clearrf   r   r   r   
test_clearq  s    zEventTests.test_clearc                    s   t   g } fdd}t ||}t dI d H  | g |       |          | dt	 j
 t dI d H  | dg| | dt	 j
 | |  | |  d S )Nc                    s      I d H r| d dS r+   rk   r/   rm   r   r   r2     s    
z.EventTests.test_clear_with_waiters.<locals>.c1r   r,   )r   rd   r:   r)   r;   rj   rs   r"   rn   rN   rG   r   r=   r0   r   r0   r2   tr   rm   r   test_clear_with_waiters{  s"    z"EventTests.test_clear_with_waitersN)r`   ra   rb   r   r   r   ro   rq   rr   rt   rw   r   r   r   r   rc     s   
&	
rc   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!d" Zd#d$ Zd%S )&ConditionTestsc                    sr   t  }| tL tj|d}| |j| tjt d}| |jt  W d    n1 sd0    Y  d S r	   )	r   r   r   r   r   r&   r   r   r   )r   r   condr   r   r   r     s    zConditionTests.test_ctor_loopc                    s   t  }| |jt   d S r   )r   r&   r   r   r   r   ry   r   r   r   r     s    zConditionTests.test_ctor_noloopc                    s  t   g } fdd} fdd} fdd}t ||}t ||}t ||}t dI d H  | g | |    |   I d H   	  t dI d H  | g | |     
  t dI d H  | dg| |     	d	 t dI d H  | dg| |     
  t dI d H  | dd	g| |     
  t dI d H  | g d
| |    | |  | |  | |  | |  | |  | |  d S )Nc                    s*      I d H    I d H r&| d dS r+   r   rl   r.   r/   ry   r   r   r2     s    
z$ConditionTests.test_wait.<locals>.c1c                    s*      I d H    I d H r&| d dS r3   r{   r/   r|   r   r   r5     s    
z$ConditionTests.test_wait.<locals>.c2c                    s*      I d H    I d H r&| d dS r6   r{   r/   r|   r   r   r8     s    
z$ConditionTests.test_wait.<locals>.c3r   r,   r4   r9   )r   r&   r:   r)   r;   r"   r#   r   r   notifyr<   r=   r0   r>   r   r|   r   ro     sL    
zConditionTests.test_waitc                    s   t  }| I d H  t | }t  |j | t j	 |I d H  W d    n1 s`0    Y  | 
|j | |  d S r   )r   r&   r   r:   rl   r   rC   rD   rE   rF   r"   rG   r   r#   )r   ry   rl   r   r   r   rr     s    (zConditionTests.test_wait_cancelc                    s   t  }| I d H  | |  t | }t dI d H  | |  | I d H  | |  |	  t 
 |j t 
 |j z|I d H  W n t jy   Y n0 | |  d S )Nr   )r   r&   r   r   r#   r:   rl   r)   r"   r}   r   rC   rD   r<   rF   )r   ry   Z	wait_taskr   r   r   test_wait_cancel_contested  s     z)ConditionTests.test_wait_cancel_contestedc                    s   |  t  tjt d W d    n1 s00    Y  d fdd}t| }tdI d H    I d H     tdI d H  |	  tdI d H   
  tdI d H  | |  |  d S )Nr
   Fc                	      sN    4 I d H ( d   I d H  W d   I d H  qJ1 I d H s@0    Y  d S )NT)rl   r   ry   Zwaitedr   r   wait_on_cond  s    zBConditionTests.test_wait_cancel_after_notify.<locals>.wait_on_condr   )r   r   r   r&   r   r:   r)   r   r}   rD   r<   r   rP   )r   r   waiterr   r   r   test_wait_cancel_after_notify
  s    .z,ConditionTests.test_wait_cancel_after_notifyc                    sD   t  }| t | I d H  W d    n1 s60    Y  d S r   )r   r&   rE   r\   rl   rz   r   r   r   test_wait_unacquired$  s    z#ConditionTests.test_wait_unacquiredc                    s   t   dfddg } fdd}t ||}t dI d H  | g |   I d H        t dI d H  | g | d  I d H        t dI d H  | dg| | |	  | |
  d S )	NFc                      s    S r   r   r   )presultr   r   	predicate-  s    z/ConditionTests.test_wait_for.<locals>.predicatec                    s4      I d H   I d H r0| d    dS r+   )r   wait_forr.   r<   r/   )ry   r   r   r   r2   2  s
    
z(ConditionTests.test_wait_for.<locals>.c1r   Tr,   r   r&   r:   r)   r;   r   r}   r<   r   r=   r0   ru   r   )ry   r   r   r   test_wait_for)  s*    zConditionTests.test_wait_forc                    sn   t  }|dd I d H }| g d| | t$ |dd I d H  W d    n1 s`0    Y  d S )Nc                   S   s   g dS )Nr9   r   r   r   r   r   <lambda>R      z9ConditionTests.test_wait_for_unacquired.<locals>.<lambda>r9   c                   S   s   dS )NFr   r   r   r   r   r   V  r   )r   r&   r   r;   rE   r\   )r   ry   rp   r   r   r   test_wait_for_unacquiredN  s
    z'ConditionTests.test_wait_for_unacquiredc                    sV  t   g } fdd} fdd} fdd}t ||}t ||}t ||}t dI d H  | g |   I d H   d    t dI d H  | dg|   I d H   d  d	    t dI d H  | g d
| | |	  | |
  | |	  | |
  | |	  | |
  d S )Nc                    s2      I d H    I d H r.| d    dS r+   r   rl   r.   r<   r/   r|   r   r   r2   \  s
    
z&ConditionTests.test_notify.<locals>.c1c                    s2      I d H    I d H r.| d    dS r3   r   r/   r|   r   r   r5   c  s
    
z&ConditionTests.test_notify.<locals>.c2c                    s2      I d H    I d H r.| d    dS r6   r   r/   r|   r   r   r8   j  s
    
z&ConditionTests.test_notify.<locals>.c3r   r,   i   r9   r   r>   r   r|   r   test_notifyX  s6    


zConditionTests.test_notifyc                    s   t   g } fdd} fdd}t ||}t ||}t dI d H  | g |   I d H        t dI d H  | ddg| | |	  | |
  | |	  | |
  d S )Nc                    s2      I d H    I d H r.| d    dS r+   r   r/   r|   r   r   r2     s
    
z*ConditionTests.test_notify_all.<locals>.c1c                    s2      I d H    I d H r.| d    dS r3   r   r/   r|   r   r   r5     s
    
z*ConditionTests.test_notify_all.<locals>.c2r   r,   r4   )r   r&   r:   r)   r;   r   
notify_allr<   r   r=   r0   )r   r0   r2   r5   r?   r@   r   r|   r   test_notify_all  s"    zConditionTests.test_notify_allc                 C   s   t  }| t|j d S r   )r   r&   rE   r\   r}   rz   r   r   r   test_notify_unacquired  s    z%ConditionTests.test_notify_unacquiredc                 C   s   t  }| t|j d S r   )r   r&   rE   r\   r   rz   r   r   r   test_notify_all_unacquired  s    z)ConditionTests.test_notify_all_unacquiredc                    s   t  }| dt|v  | tt| | I d H  | dt|v  |jt	
  | dt|v  | tt| |jt	
  | dt|v  | tt| d S )Nunlockedr#   rh   	waiters:2)r   r&   r   r   r   r   r   rG   r.   r   r   rz   r   r   r   r     s    zConditionTests.test_reprc              	      sn   t  }| |  |4 I d H $ | |  W d   I d H  q\1 I d H sR0    Y  | |  d S r   )r   r&   r"   r#   r   rz   r   r   r   r_     s
    8z#ConditionTests.test_context_managerc                    sN   d fdd	}| I d H  |t  I d H  t  }||t |I d H  d S )Nc              	      s4  | d u rt  } |d u r"t | } |j|   |    |  |4 I d H 2  |    |  W d   I d H  q1 I d H s0    Y   |    |  | 4 I d H 4  |    |  W d   I d H  q1 I d H s
0    Y   |    |  d S r   )r   r   r&   r   _lockr"   r#   r   )r   ry   r   r   r   f  s"    
8<z,ConditionTests.test_explicit_lock.<locals>.f)NN)r   r   r&   )r   r   r   r   r   r   test_explicit_lock  s
    z!ConditionTests.test_explicit_lockc                    sL   t    j  fdd} fdd}| I d H  | I d H  d S )Nc               	      s    t tj d W d    n1 s,0    Y  t }  | _| 4 I d H L td t|  W d    n1 s~0    Y  W d   I d H  q1 I d H s0    Y  d S )Nr
   "loop argument must agree with lock)r   r   r   r   r   r    
ValueErrorr&   r1   r   r   r   r   wrong_loop_in_lock  s    *z?ConditionTests.test_ambiguous_loops.<locals>.wrong_loop_in_lockc               
      s   t  } | 4 I d H z tdH t t j|  d W d    n1 sR0    Y  W d    n1 sp0    Y  W d   I d H  q1 I d H s0    Y  d S )Nr   r
   )r   r   r    r   r   r   r&   r1   r   r   r   wrong_loop_in_cond  s    z?ConditionTests.test_ambiguous_loops.<locals>.wrong_loop_in_cond)r   Znew_event_loopZ
addCleanupclose)r   r   r   r   r   r   test_ambiguous_loops  s    z#ConditionTests.test_ambiguous_loopsc              	      s   t  }|4 I d H Z | t j( t j| ddI d H  W d    n1 sP0    Y  W d   I d H  q1 I d H sz0    Y  d S )Ng      ?)timeout)r   r&   rE   TimeoutErrorr   rl   )r   Z	conditionr   r   r   test_timeout_in_block  s    z$ConditionTests.test_timeout_in_blockN)r`   ra   rb   r   r   ro   rr   r~   r   r   r   r   r   r   r   r   r   r_   r   r   r   r   r   r   r   rx     s$   	?%
4$"rx   c                   @   st   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S )SemaphoreTestsc                    s   t  }| t tj|d}W d    n1 s40    Y  | |j| | t  tjt d}W d    n1 s|0    Y  | |jt  d S r	   )	r   r   r   r   r   r'   r   r   r   )r   r   semr   r   r   r     s    *.zSemaphoreTests.test_ctor_loopc                    s   t  }| |jt   d S r   )r   r'   r   r   r   r   r   r   r   r   r     s    zSemaphoreTests.test_ctor_noloopc                    sN   |  t" tjdt d}W d    n1 s20    Y  | |  d S )Nr   r
   )r   r   r   r'   r   r   r#   r   r   r   r   test_initial_value_zero"  s    0z&SemaphoreTests.test_initial_value_zeroc                    s   t  }| t|d | tt| | I d H  | t|d | dt|v | tt| |j	t
  | dt|v  | tt| |j	t
  | dt|v  | tt| d S )Nz[unlocked, value:1]>r   waitersrh   r   )r   r'   r   r   r   r   r   r   rG   r.   r   r   r   r   r   r   r   '  s    zSemaphoreTests.test_reprc                    sl   t  }| d|j | td |I d H  W d    n1 sB0    Y  | |  | d|j d S )Nr,   z4object Semaphore can't be used in 'await' expression)r   r'   r;   _valuer    r!   r"   r#   r   r   r   r   test_semaphore9  s    (zSemaphoreTests.test_semaphorec                 C   s   |  ttjd d S )N)rE   r   r   r'   r   r   r   r   test_semaphore_valueF  s    z#SemaphoreTests.test_semaphore_valuec                    s  t d g }|   I d H  |   I d H  |     fdd} fdd} fdd} fdd	}t ||}t ||}t ||}t d
I d H  | dg| |    | dt	 j
 | d
 j t ||}	      | d j t d
I d H  | d
 j | dt	| |    | dt	 j
 | d
 j | |  | |  |||	g}
dd |
D }| dt	|    t j|
 I d H  d S )Nr7   c                    s      I d H  | d dS r+   r-   r/   r   r   r   r2   Q  s    
z'SemaphoreTests.test_acquire.<locals>.c1c                    s      I d H  | d dS r3   r-   r/   r   r   r   r5   V  s    
z'SemaphoreTests.test_acquire.<locals>.c2c                    s      I d H  | d dS r6   r-   r/   r   r   r   r8   [  s    
z'SemaphoreTests.test_acquire.<locals>.c3c                    s      I d H  | d dS )N   Tr-   r/   r   r   r   c4`  s    
z'SemaphoreTests.test_acquire.<locals>.c4r   r,   r4   c                 S   s    g | ]}|  r| r|qS r   )r=   r0   .0rv   r   r   r   
<listcomp>  r   z/SemaphoreTests.test_acquire.<locals>.<listcomp>)r   r'   r   r   r"   r#   r:   r)   r;   rN   rG   r   r<   r=   r0   gather)r   r0   r2   r5   r8   r   r?   r@   rA   t4Z
race_tasksZ
done_tasksr   r   r   rB   I  sD    

zSemaphoreTests.test_acquirec                    s   t  }| I d H  t | }t  |j | t j |I d H  W d    n1 s`0    Y  | 	|j
 ptdd |j
D  d S )Nc                 s   s   | ]}|  V  qd S r   r=   )r   r   r   r   r   	<genexpr>  r   z5SemaphoreTests.test_acquire_cancel.<locals>.<genexpr>)r   r'   r   r:   r   rC   rD   rE   rF   r   rG   all)r   r   r   r   r   r   rH     s    (z"SemaphoreTests.test_acquire_cancelc                    s   t jdd}t | }t | }t | }t | }t dI d H  |  |  |  t dI d H  tdd ||fD }| |d | 	|
  | |
  |  |  t dI d H  d S )Nr   valuec                 s   s   | ]}|  V  qd S r   r   r   r   r   r   r     r   zCSemaphoreTests.test_acquire_cancel_before_awoken.<locals>.<genexpr>r,   )r   r'   r:   r   r)   rD   r<   sumr;   r   r=   r"   )r   r   r?   r@   rA   r   Znum_doner   r   r   !test_acquire_cancel_before_awoken  s"    z0SemaphoreTests.test_acquire_cancel_before_awokenc                    sx   t jdd}t | }t | }t dI d H  |  |  t dI d H  | |  | |	  d S )Nr   r   )
r   r'   r:   r   r)   rD   r<   r   r#   r=   )r   r   r?   r@   r   r   r   test_acquire_hang  s    z SemaphoreTests.test_acquire_hangc                    sL   |  t  tjt d}W d    n1 s00    Y  | t|j d S r	   )r   r   r   r(   r   rE   r   r<   r   r   r   r   r]     s    .z(SemaphoreTests.test_release_not_acquiredc                    s>   t  }| I d H  | |  |  | |  d S r   )r   r'   r   r   r#   r<   r"   r   r   r   r   r^     s
    z&SemaphoreTests.test_release_no_waitersc                    sn   t dg   fdd}t |d}t |d}t |d}t |||I d H  | g d  d S )Nr,   c                    sp     I d H   |  d tdI d H      I d H   |  d tdI d H    d S )NZ_1r%   Z_2)r   r.   r   r)   r<   )tagr0   r   r   r   coro  s    z4SemaphoreTests.test_acquire_fifo_order.<locals>.coror2   r5   r8   )Zc1_1Zc2_1Zc3_1Zc1_2Zc2_2Zc3_2)r   r'   r:   r   r;   )r   r   r?   r@   rA   r   r   r   test_acquire_fifo_order  s    
z&SemaphoreTests.test_acquire_fifo_orderN)r`   ra   rb   r   r   r   r   r   r   rB   rH   r   r   r]   r^   r   r   r   r   r   r     s   
=r   __main__)__doc__Zunittestr   rer   ZSTR_RGX_REPRcompiler   r   ZIsolatedAsyncioTestCaser   rc   rx   r   r`   mainr   r   r   r   <module>   s&   
  }  | N