o
    LK&h                     @   s`   d 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mZ dZ	ej
dd ZG d	d
 d
ZdS )zdevelop tests    N)Distribution   )contextsz7from setuptools import setup

setup(py_modules=['hi'])
c                 c   s    | d  d}|t W d    n1 sw   Y  | d  d}|d W d    n1 s4w   Y  |   | V  W d    d S 1 sLw   Y  d S )Nsetup.pywhi.pyz1
)openwriteSETUP_PYas_cwd)tmpdirf r   R/var/www/html/venv/lib/python3.10/site-packages/setuptools/tests/test_bdist_egg.pysetup_context   s   
"r   c                   @   sf   e Zd Zejdejddd Zejjej	
ddddejdejdd	d
 ZdS )Testuser_overrider   c                 C   s   t tddgddgd}ttjdd t  |  |	  W d    n1 s-w   Y  t
d\}td	|s@J d S )
Nr   	bdist_eggfoohi)script_namescript_argsname
py_modulesbuildsrcdistzfoo-0.0.0-py[23].\d+.egg$)r   dictosmakedirspathjoinr   quietparse_command_linerun_commandslistdirrematch)selfr   contentr   r   r   test_bdist_egg   s   

zTest.test_bdist_eggPYTHONDONTWRITEBYTECODEFzByte code disabled)reasonc                 C   s   t tdddgdgd}t  |  |  W d    n1 s#w   Y  td\}tj	d|}t
|}tdd |jD }d	|v sJJ d
|vsPJ d S )Nr   r   z--exclude-source-filesr   )r   r   r   r   c                 s   s    | ]}|j V  qd S )N)filename).0zir   r   r   	<genexpr>G   s    z1Test.test_exclude_source_files.<locals>.<genexpr>zhi.pycr   )r   r   r   r"   r#   r$   r   r%   r    r!   zipfileZipFilelistfilelist)r(   r   	dist_namedist_filenamezipnamesr   r   r   test_exclude_source_files3   s"   


zTest.test_exclude_source_filesN)__name__
__module____qualname__pytestmarkusefixturesr*   xfailr   environgetr9   r   r   r   r   r      s    



r   )__doc__r   r&   r1   r=   setuptools.distr    r   r
   fixturer   r   r   r   r   r   <module>   s    
	