[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.191.240.117: ~ $


�VF�@s�dZddlmZddlZddlZddlZddlZeje�Z	Gdd�dej
�ZGdd�dej
�Zy ddl
mZd	ZeZWnek
r�d
ZeZYnXdS)a�setuptools/distutils commands to run testr via setup.py

Currently provides 'testr' which runs tests using testr. You can pass
--coverage which will also export PYTHON='coverage run --source <your package>'
and automatically combine the coverage from each testr backend test runner
after the run completes.

To use, just use setuptools/distribute and depend on testr, and it should be
picked up automatically (as the commands are exported in the testrepository
package metadata.
�)�cmdNc	@s�eZdZdZd!d"d#d$d%d&d'gZdd
dgZdd�Zdd�Zdd�Zdd�Z	dd�Z
dd �ZdS)(�	TestrRealzRun unit tests using testr�coverageN�GReplace PYTHON with coverage and merge coverage from each testr worker.�testr-args=�t�Run 'testr' with these args�omit=�o�(Files to omit from coverage calculations�coverage-package-name=�"Use this name for coverage package�slowest�-Show slowest test times after tests complete.�no-parallel�Run testr serially�
log-level=�l�Log level (default: info)�no_parallelcGsCtjd|�tjtjdgt|�tjtjtj	�S)Nz _run_testr called with args = %rr)
�logger�debug�commandsZrun_argv�sys�argv�list�stdin�stdout�stderr)�self�args�r!�/testr_command.py�
_run_testrCszTestrReal._run_testrcCsCd|_d|_d|_d|_d|_d|_d|_dS)N��info)�
testr_argsr�omitr�coverage_package_namer�	log_level)rr!r!r"�initialize_optionsHs						zTestrReal.initialize_optionscCs�tt|jj�tj�|_tjd|j�tjd�|jdkr\g|_n|jj	�|_|j
r�d|j
|_
tjd|j�dS)N�levelzfinalize_options calledz	--omit=%sz$finalize_options: self.__dict__ = %r)�getattr�loggingr)�upper�INFO�basicConfigrrr&�splitr'�__dict__)rr!r!r"�finalize_optionsQs
	zTestrReal.finalize_optionscCs�tjd�tjjd�s,|jd�|jr?|j�|jsc|jdd|j	�}n|jd|j	�}|r�t
jjd|��|j
r�td�|jd�|jr�|j�d	S)
z"Set up testr repo, then run testr.z
run calledz.testrepositoryZinit�runz
--parallelztestr failed (%d)z
Slowest TestsrN)rr�os�path�isdirr#r�_coverage_beforerr&�	distutils�errorsZDistutilsErrorr�print�_coverage_after)rZ	testr_retr!r!r"r4`s 

	
		
	

	z
TestrReal.runcCs�tjd�|jj�}|jd�r;|dd�}|jrM|j}d|}d|tjd<tjdtjd�dS)Nz_coverage_before calledzpython-�z--source %s --parallel-modezcoverage run %s�PYTHONzos.environ['PYTHON'] = %r)rrZdistribution�get_name�
startswithr(r5�environ)r�packageZoptionsr!r!r"r8us
		
zTestrReal._coverage_beforecCs2tjd�tjd�tjd|j�dS)Nz_coverage_after calledzcoverage combinezcoverage html -d ./cover %s)rrr5�systemr')rr!r!r"r<�s

zTestrReal._coverage_after)zcoverageNr)rrr)r	r
r)rNr
)zslowestNr)rNr)rrr)�__name__�
__module__�__qualname__�description�user_optionsZboolean_optionsr#r*r3r4r8r<r!r!r!r"r2s		
rc@s@eZdZdZgZdd�Zdd�Zdd�ZdS)	�	TestrFakezRun unit tests using testrcCsdS)Nr!)rr!r!r"r*�szTestrFake.initialize_optionscCsdS)Nr!)rr!r!r"r3�szTestrFake.finalize_optionscCstd�dS)Nz7Install testrepository to run 'testr' command properly.)r;)rr!r!r"r4�sz
TestrFake.runN)rDrErFrGrHr*r3r4r!r!r!r"rI�s
rI)rTF)�__doc__r9rZdistutils.errorsr-r5r�	getLoggerrDrZCommandrrIZtestrepositoryrZ
have_testrZTestr�ImportErrorr!r!r!r"�<module>'sV



Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 95 B 0644
__init__.cpython-35.pyc File 95 B 0644
builddoc.cpython-35.opt-1.pyc File 6.58 KB 0644
builddoc.cpython-35.pyc File 6.58 KB 0644
core.cpython-35.opt-1.pyc File 2.94 KB 0644
core.cpython-35.pyc File 2.94 KB 0644
extra_files.cpython-35.opt-1.pyc File 620 B 0644
extra_files.cpython-35.pyc File 620 B 0644
find_package.cpython-35.opt-1.pyc File 721 B 0644
find_package.cpython-35.pyc File 721 B 0644
git.cpython-35.opt-1.pyc File 8.13 KB 0644
git.cpython-35.pyc File 8.13 KB 0644
options.cpython-35.opt-1.pyc File 412 B 0644
options.cpython-35.pyc File 412 B 0644
packaging.cpython-35.opt-1.pyc File 20.16 KB 0644
packaging.cpython-35.pyc File 20.16 KB 0644
pbr_json.cpython-35.opt-1.pyc File 632 B 0644
pbr_json.cpython-35.pyc File 632 B 0644
testr_command.cpython-35.opt-1.pyc File 4.63 KB 0644
testr_command.cpython-35.pyc File 4.63 KB 0644
util.cpython-35.opt-1.pyc File 15.43 KB 0644
util.cpython-35.pyc File 15.43 KB 0644
version.cpython-35.opt-1.pyc File 15.17 KB 0644
version.cpython-35.pyc File 15.17 KB 0644