Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/distutils/tests/__pycache__/test_bdist_rpm.cpython-39.pyc

a

��g��@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZddl
mZdZGd	d
�d
ejejejej�Zdd�Zed
kr�ee��dS)z&Tests for distutils.command.bdist_rpm.�N)�run_unittest�
requires_zlib)�Distribution)�	bdist_rpm)�support)�find_executablez�from distutils.core import setup
import foo

setup(name='foo', version='0.1', py_modules=['foo'],
      url='xxx', author='xxx', author_email='xxx')

cs�eZdZ�fdd�Z�fdd�Ze�ej�	d�d�e
�e�ed�dud	�e�ed
�dud�dd
�����Z
e�ej�	d�d�e
�e�ed�dud	�e�ed
�dud�dd�����Z�ZS)�BuildRpmTestCasecs`ztj�d�Wnty,t�d��Yn0tt|���t	�
�|_tjtjdd�f|_
dS)NzUTF-8z(sys.executable is not encodable to UTF-8)�sys�
executable�encode�UnicodeEncodeError�unittestZSkipTest�superr�setUp�os�getcwd�old_location�argv�old_sys_argv��self��	__class__��:/usr/local/lib/python3.9/distutils/tests/test_bdist_rpm.pyrs
zBuildRpmTestCase.setUpcs>t�|j�|jdt_|jdtjdd�<tt|���dS)Nr�)	r�chdirrrr	rrr�tearDownrrrrr%szBuildRpmTestCase.tearDown�linuxz,spurious sdtout/stderr output under Mac OS XZrpmNzthe rpm command is not foundZrpmbuildz!the rpmbuild command is not foundcCs�|��}|tjd<tj�|d�}t�|�|�|dft�|�|dfd�|�|dfd�|�|dfd	�tdd
dgdddd��}d|_	t�
|�dgt_t
|�}d
|_d|_|��|��t�tj�|d��}|�d|�|�d|j�|�d|j�dS�N�HOMEZfoozsetup.pyzfoo.py�#zMANIFEST.inzinclude foo.pyZREADME�z0.1Zxxx)�name�versionZ
py_modules�urlZauthorZauthor_emailTr�distzfoo-0.1-1.noarch.rpm)r�anyzdist/foo-0.1-1.src.rpm)rr'zdist/foo-0.1-1.noarch.rpm)�mkdtempr�environ�path�join�mkdir�
write_file�SETUP_PYr�script_namerr	rr�
fix_python�quiet�ensure_finalized�run�listdir�assertIn�
dist_files�rZtmp_dirZpkg_dirr&�cmdZdist_createdrrr�
test_quiet-s2	

�
zBuildRpmTestCase.test_quietcCs|��}|tjd<tj�|d�}t�|�|�|dft�|�|dfd�|�|dfd�|�|dfd	�tdd
dgdddd��}d|_	t�
|�dgt_t
|�}d
|_d|_|��|��t�tj�|d��}|�d|�|�d|j�|�d|j�t�tj�|dd��dSr)r(rr)r*r+r,r-r.rr/rr	rrr0r1r2r3r4r5r6�remover7rrr�test_no_optimize_flagXs4


�
z&BuildRpmTestCase.test_no_optimize_flag)�__name__�
__module__�__qualname__rrr
Z
skipUnlessr	�platform�
startswithrZskipIfrr9r;�
__classcell__rrrrrs0
���$���rcCs
t�t�S)N)r
Z	makeSuiterrrrr�
test_suite�srB�__main__)�__doc__r
r	rZtest.supportrrZdistutils.corerZdistutils.command.bdist_rpmrZdistutils.testsrZdistutils.spawnrr.ZTempdirManagerZEnvironGuardZLoggingSilencerZTestCaserrBr<rrrr�<module>s"	�m

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists