B
    18\                 @   sl   d Z ddlZddlZddlmZ ddlmZ ddlmZ G dd dej	ej
Zdd	 Zed
krhee  dS )z"Tests for distutils.command.bdist.    N)run_unittest)bdist)supportc               @   s   e Zd Zdd Zdd ZdS )BuildTestCasec          	   C   sd   |   d }t|}dg|_|  | |jdg dddddddd	d
g	}t|j}| || d S )N   Zmsibztargztarrpmtarwininstxztarzipztar)create_distr   formatsensure_finalizedassertEqualsortedZformat_command)selfdistcmdr   found r   ^/oak/stanford/groups/akundaje/marinovg/programs/Python-3.7.3/Lib/distutils/tests/test_bdist.pytest_formats   s    

zBuildTestCase.test_formatsc             C   s   |   d }t|}d|_|  ||jd< ddg}tjdkrH|d x6|D ].}||}t	|ddrjqN| 
|jd	|  qNW d S )
Nr   r   
bdist_dumbbdist_wininstnt	bdist_msi_unsupportedFz&%s should take --skip-build from bdist)r   r   
skip_buildr   command_objosnameappendget_finalized_commandgetattr
assertTrue)r   r   r   namesr#   Zsubcmdr   r   r   test_skip_build   s    




zBuildTestCase.test_skip_buildN)__name__
__module____qualname__r   r)   r   r   r   r   r   
   s   r   c               C   s
   t tS )N)unittest	makeSuiter   r   r   r   r   
test_suite1   s    r/   __main__)__doc__r"   r-   Ztest.supportr   Zdistutils.command.bdistr   distutils.testsr   TempdirManagerTestCaser   r/   r*   r   r   r   r   <module>   s   &