U
    aÊ¹j;  ã                   @   sf   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�d	d
„ ƒZG dd„ dƒZdS )zdevelop testsé    N)ÚDistributioné   )Úcontextsz7from setuptools import setup

setup(py_modules=['hi'])
Úfunction)Úscopec              	   c   sf   | d   d¡�}| t¡ W 5 Q R X | d   d¡�}| d¡ W 5 Q R X |  ¡ � | V  W 5 Q R X d S )Núsetup.pyÚwúhi.pyz1
)ÚopenÚwriteÚSETUP_PYZas_cwd)ZtmpdirÚf© r   ú^/var/www/html/bwave/python/venv/lib/python3.8/site-packages/setuptools/tests/test_bdist_egg.pyÚsetup_context   s    
r   c                   @   s6   e Zd Zdd„ Zejjej 	dd¡dd�dd„ ƒZ
d	S )
ÚTestc              	   C   sp   t tddgddgd�ƒ}t tj dd¡¡ t ¡ � | ¡  | 	¡  W 5 Q R X t 
d¡\}t d	|¡slt‚d S )
Nr   Ú	bdist_eggZ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ÚAssertionError)Úselfr   Úuser_overrider   Úcontentr   r   r   Útest_bdist_egg   s    üÿ
zTest.test_bdist_eggZPYTHONDONTWRITEBYTECODEFzByte code disabled)Úreasonc              	   C   s�   t tdddgdgd�ƒ}t ¡ � | ¡  | ¡  W 5 Q R X t d¡\}tj 	d|¡}t
 |¡}tdd„ |jD ƒƒ}d	|ks€t‚d
|ksŒt‚d S )Nr   r   z--exclude-source-filesr   )r   r   r   r   c                 s   s   | ]}|j V  qd S )N)Úfilename)Ú.0Zzir   r   r   Ú	<genexpr>C   s     z1Test.test_exclude_source_files.<locals>.<genexpr>zhi.pycr	   )r   r   r   r    r!   r"   r   r#   r   r   ÚzipfileÚZipFileÚlistÚfilelistr&   )r'   r   r(   r   Ú	dist_nameZdist_filenameÚzipÚnamesr   r   r   Útest_exclude_source_files1   s     ýÿ

zTest.test_exclude_source_filesN)Ú__name__Ú
__module__Ú__qualname__r*   ÚpytestÚmarkZxfailr   ÚenvironÚgetr6   r   r   r   r   r      s   þr   )Ú__doc__r   r$   r/   r:   Zsetuptools.distr   Ú r   r   Zfixturer   r   r   r   r   r   Ú<module>   s   

	