403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.118.212.165
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/testr_command.cpython-38.pyc
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�commands�run_argv�sys�argv�list�stdin�stdout�stderr)�self�args�r�B/opt/alt/python38/lib/python3.8/site-packages/pbr/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�INFO�basicConfigrrr�splitr�__dict__r rrr�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.testrepository�init�run�
--parallelztestr failed (%d)z
Slowest TestsrN)r,r-)r,)rr�os�path�isdirrr�_coverage_beforer
r�	distutils�errors�DistutilsErrorr�print�_coverage_after)r�	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 %s�PYTHONzos.environ['PYTHON'] = %r)rr�distribution�get_name�
startswithrr.�environ)r�package�optionsrrrr1us


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

zTestrReal._coverage_afterN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrr!r*r,r1r6rrrrr2s �
	
rc@s,eZdZdZgZdd�Zdd�Zdd�ZdS)	�	TestrFakercCsdS�Nrr rrrr!�szTestrFake.initialize_optionscCsdSrHrr rrrr*�szTestrFake.finalize_optionscCstd�dS)Nz7Install testrepository to run 'testr' command properly.)r5r rrrr,�sz
TestrFake.runN)rArBrCrDrEr!r*r,rrrrrG�s
rG)r
TF)�__doc__r2r�distutils.errorsr$r.r�	getLoggerrAr�CommandrrGZtestrepositoryr
�
have_testr�Testr�ImportErrorrrrr�<module>s
V

Youez - 2016 - github.com/yon3zu
LinuXploit