ó
ĐH/\c           @   sü   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l j Z d  d l m Z e j	 j
 e  Z d   Z d Z i d d 6d d	 6Z d
 e j f d     YZ d   Z x* e   j   D] \ Z Z e e   e <qÂ We d k rř e j   n  d S(   i˙˙˙˙N(   t   utilc          C   sz   t  j   }  zY t  j t  d d d d d d d d g } | g  t j d	  D] } | d
 ^ qM 7} Wd  t  j |   X| S(   Ns   wsgiserver.pys   wsgiserver_ssl.pys   webproxy.pys   webpy.pys   unixsocket_server.pys   unixsocket_client.pys   psycopg2_pool.pys   geventsendfile.pys   test__example_*.pyi   (   t   ost   getcwdt   chdirt   this_dirt   glob(   t   old_dirt   resultt   x(    (    s:   lib/python2.7/site-packages/gevent/tests/test__examples.pyt   _find_files_to_ignore   s    	.i   i   i    i   s   concurrent_download.pys   processes.pyt   _AbstractTestMixinc           B   s   e  Z d Z d Z d   Z RS(   i   i   c         C   s˘   t  j    } |  j \ } } t j t j d |  j g d | d |  j d t d t d t d i d d	 6r~ |  j	 d
 |  j  n  t  j    | } |  j
 | |  d  S(   Ns   -ut   timeoutt   cwdt   quiett   buffer_outputt   nestedt   setenvt   errort   GEVENT_DEBUGs   Failed example: (   t   timet
   time_rangeR    t   runt   syst
   executablet   filenameR   t   Truet   failt   assertGreaterEqual(   t   selft   startt   min_timet   max_timet   took(    (    s:   lib/python2.7/site-packages/gevent/tests/test__examples.pyt	   test_runs,   s    	(   i   i   N(   t   __name__t
   __module__R   t   NoneR   R!   (    (    (    s:   lib/python2.7/site-packages/gevent/tests/test__examples.pyR
   (   s   c          C   sÜ   i  }  y t  j   j } Wn( t j k
 rC t  j d d d |  SXt   } x t j | d  D]s } t j	 j
 |  } | | k r qa n  t d | t t j f i | d 6t j | t j  d 6 } | |  | j <qa W|  S(   Ns   WARNING: No examples dir foundt   colors   suboptimal-behaviours   /*.pyt   Test_R   R   (   R    t   ExampleMixinR   t   unittestt   SkipTestt   logR	   R   R   t   patht   basenamet   typeR
   t	   greentestt   TestCaset   time_rangest   getR   R"   (   R   t   example_dirt   ignoreR   t   bnt   tc(    (    s:   lib/python2.7/site-packages/gevent/tests/test__examples.pyt   _build_test_classes;   s&    	t   __main__(   i   i   (   i    i   (   i    i   (   R   R   R   R   R(   t   gevent.testingt   testingR.   R    R+   t   dirnamet   __file__R   R	   t   default_time_rangeR0   R'   R
   R6   t   itemst   kt   vt   localsR"   t   main(    (    (    s:   lib/python2.7/site-packages/gevent/tests/test__examples.pyt   <module>   s$   	
	