
    i\                         d dl 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 d dlZd Z	d Z
e
 G d d	e j                              Zed
k    r e             dS dS )    N)modules)main)NON_APPLICABLE_SUFFIXES)sixc                 ~     t          j                     fd}d                    dd          z   }||_        |S )Nc                 "   t          d          5 }|                                }d d d            n# 1 swxY w Y   t          j                    5  t          j        dt
                     d}j        dk    rg|d<   |d<   n#dv r                    dd          d	         |d<   	 t          j	        ||           n4# t          $ r' t          j        v rt          j        d
z             w xY w	 d d d            d S # 1 swxY w Y   d S )Nrbignore)__file____name__z__init__.py__path____package__.   r   z#Unable to import optional module %s)openreadwarningscatch_warningssimplefilterDeprecationWarningnamersplitr   exec_ImportErrorr   OPTIONAL_MODULESunittestSkipTest)_fsrcglobsmodulepaths       I/usr/local/lib/python3.11/dist-packages/gevent/tests/test__execmodules.pytestzmake_exec_test.<locals>.test   s   $ 	&&((C	 	 	 	 	 	 	 	 	 	 	 	 	 	 	$&& 	 	!(,>???!%6::EyM))%)Fj!'-m$$'-}}S!'<'<Q'?m$	#u%%%%   W555"+,QTZ,Z[[[ &	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s7   377AD,CD1C33DDDtest_r   r   )pathlibPathreplacer   )r#   r"   r%   r   s   ``  r$   make_exec_testr*      sW    <D     & V^^C---DDMK    c                     t          j        dd          D ]F\  }}|                    t                    r t	          ||          }t          | |j        |           G| S )NTF)	recursivecheck_optional)r   walk_modulesendswithr   r*   setattrr   )clsr#   r"   r%   s       r$   make_all_testsr3   %   sh    ,tERRR * *f??233 	dF++T]D))))Jr+   c                       e Zd ZdS )TestN)r   
__module____qualname__ r+   r$   r5   r5   .   s        Dr+   r5   __main__)r   r   gevent.testingr   r   gevent.testing.sysinfor   r   r'   r*   r3   TestCaser5   r   r8   r+   r$   <module>r=      s      " " " " " "       : : : : : :         4   	 	 	 	 	8 	 	 	 z 	DFFFFF	 r+   