
    ia                         d dl Z d dlZd dlmZ d dlmZ d dlmZ ej        r ej	                      G d de
          Zd Zd Z G d d	ej                  Zed
k    r ej                     dS dS )    N)six)ExpectedExceptionc                       e Zd ZdS )RawExceptionN)__name__
__module____qualname__     F/usr/local/lib/python3.11/dist-packages/gevent/tests/test__exc_info.pyr   r   
   s        Dr   r   c                 j    t          j                    dk    sJ t          j                                | )NNNN)sysexc_info)errs    r   hellor      s-    <>>///////
Ir   c                  b    	 t          t          d                     d S # t          $ r Y d S w xY w)Nexpected exception in hello)r   ExpectedErrorr
   r   r   hello2r      sF    m9::;;;;;   s     
..c                       e Zd Zd Zd ZdS )Testc                    t          d          }t          d          }	 |# t           $ r |                                  t          j        t
          |          }|                                 |                     t          |           |                     |j	        t                     	  #  t          j                    d         }|                     ||           Y Y d S xY ww xY w)Nr   r      )r   r   expect_one_errorgeventspawnr   joinassert_errorassertIsInstance	exceptionr   r   assertIs)selferrorexpected_errorgexs        r   test1z
Test.test1   s    W%%&'DEE	)K 	) 	) 	)!!###UN33AFFHHHm^<<<!!!+}===))\^^A&b%(((((((	)s"   " BC$*B++1C C$ C$c                 b   t          j                    j                            d          }|                    t
                     	 t          j        d           |                     t          j	                    d           |
                                 d S # |
                                 w xY w)Nr   g?r   )r   get_hublooptimerstartr   sleepassertEqualr   r   close)r#   r,   s     r   test2z
Test.test2.   s      %++A..F	LS\^^-?@@@KKMMMMMEKKMMMMs   ;B B.N)r   r   r	   r(   r1   r
   r   r   r   r      s2        ) ) )$    r   r   __main__)r   r   gevent.testingtesting	greentestr   r   r   PY2	exc_clear	Exceptionr   r   r   TestCaser   r   mainr
   r   r   <module>r;      s    



 " " " " " "       = = = = = =7 CMOOO	 	 	 	 	9 	 	 	  
      9   > zIN r   