[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.6.9: ~ $
U

�VF�@s�dZddlmZddlZddlZddlZddlZe�e�Z	Gdd�dej
�ZGdd�dej
�Zzddl
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\eZdZdZdddddddgZd	d
dgZdd
�Zdd�Zdd�Zdd�Z	dd�Z
dd�ZdS)�	TestrReal�Run unit tests using testr)�coverageNzGReplace PYTHON with coverage and merge coverage from each testr worker.)ztestr-args=�tzRun 'testr' with these args)zomit=�oz(Files to omit from coverage calculations)zcoverage-package-name=Nz"Use this name for coverage package)�slowestNz-Show slowest test times after tests complete.)zno-parallelNzRun testr serially)z
log-level=�lzLog level (default: info)rr�no_parallelcGs2t�d|�t�tjdgt|�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_testrCs�zTestrReal._run_testrcCs.d|_d|_d|_d|_d|_d|_d|_dS)N��info)�
testr_argsr�omitr�coverage_package_namer
�	log_level�rrrr�initialize_optionsHszTestrReal.initialize_optionscCsptt|j��tj�|_tj|jd�t�d�|jdkr@g|_n|j�	�|_|j
r^d|j
|_
t�d|j�dS)N)�levelzfinalize_options calledz	--omit=%sz$finalize_options: self.__dict__ = %r)�getattr�loggingr�upper�INFOZbasicConfigrrr�splitr�__dict__rrrr�finalize_optionsQs�

zTestrReal.finalize_optionscCs�t�d�tj�d�s |�d�|jr.|��|jsF|jd
|j	��}n|jd|j	��}|rjt
j�d|��|j
r�td�|�d�|jr�|��d	S)z"Set up testr repo, then run testr.z
run calledz.testrepositoryZinit�run�
--parallelztestr failed (%d)z
Slowest TestsrN)r)r*)r))rr�os�path�isdirrr�_coverage_beforer
r�	distutils�errorsZDistutilsErrorr�print�_coverage_after)rZ	testr_retrrrr)`s"

�
z
TestrReal.runcCsbt�d�|j��}|�d�r*|dd�}|jr6|j}d|}d|tjd<t�dtjd�dS)Nz_coverage_before calledzpython-�z--source %s --parallel-modezcoverage run %sZPYTHONzos.environ['PYTHON'] = %r)rrZdistributionZget_name�
startswithrr+�environ)r�packageZoptionsrrrr.us


zTestrReal._coverage_beforecCs(t�d�t�d�t�d|j�dS)Nz_coverage_after calledzcoverage combinezcoverage html -d ./cover %s)rrr+�systemrrrrrr2�s

zTestrReal._coverage_afterN)�__name__�
__module__�__qualname__�description�user_optionsZboolean_optionsrr r(r)r.r2rrrrr2s �
	
rc@s,eZdZdZgZdd�Zdd�Zdd�ZdS)	�	TestrFakercCsdS�Nrrrrrr �szTestrFake.initialize_optionscCsdSr>rrrrrr(�szTestrFake.finalize_optionscCstd�dS)Nz7Install testrepository to run 'testr' command properly.)r1rrrrr)�sz
TestrFake.runN)r8r9r:r;r<r r(r)rrrrr=�s
r=)r
TF)�__doc__r/rZdistutils.errorsr#r+rZ	getLoggerr8rZCommandrr=Ztestrepositoryr
Z
have_testrZTestr�ImportErrorrrrr�<module>s
V

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 103 B 0644
__init__.cpython-38.pyc File 103 B 0644
builddoc.cpython-38.opt-1.pyc File 6.05 KB 0644
builddoc.cpython-38.pyc File 6.05 KB 0644
core.cpython-38.opt-1.pyc File 2.78 KB 0644
core.cpython-38.pyc File 2.78 KB 0644
extra_files.cpython-38.opt-1.pyc File 598 B 0644
extra_files.cpython-38.pyc File 598 B 0644
find_package.cpython-38.opt-1.pyc File 678 B 0644
find_package.cpython-38.pyc File 678 B 0644
git.cpython-38.opt-1.pyc File 7.57 KB 0644
git.cpython-38.pyc File 7.57 KB 0644
options.cpython-38.opt-1.pyc File 383 B 0644
options.cpython-38.pyc File 383 B 0644
packaging.cpython-38.opt-1.pyc File 18.85 KB 0644
packaging.cpython-38.pyc File 18.85 KB 0644
pbr_json.cpython-38.opt-1.pyc File 585 B 0644
pbr_json.cpython-38.pyc File 585 B 0644
testr_command.cpython-38.opt-1.pyc File 4.31 KB 0644
testr_command.cpython-38.pyc File 4.31 KB 0644
util.cpython-38.opt-1.pyc File 13.79 KB 0644
util.cpython-38.pyc File 13.79 KB 0644
version.cpython-38.opt-1.pyc File 14.35 KB 0644
version.cpython-38.pyc File 14.35 KB 0644