| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib64/python3.6/unittest/__pycache__/ |
Upload File : |
3
\8) � @ sh d dl Z d dlZd dlZddlmZmZ ddlmZ dZdZ dZ
dd � Zd
d� ZG dd
� d
e
�ZeZdS )� N� )�loader�runner)�installHandlerTa Examples:
%(prog)s test_module - run tests from test_module
%(prog)s module.TestClass - run tests from module.TestClass
%(prog)s module.Class.test_method - run specified test method
%(prog)s path/to/test_file.py - run tests from test_file.py
aF Examples:
%(prog)s - run default set of tests
%(prog)s MyTestSuite - run suite 'MyTestSuite'
%(prog)s MyTestCase.testSomething - run MyTestCase.testSomething
%(prog)s MyTestCase - run all 'test*' test methods
in MyTestCase
c C sx t jj| �rt| j� jd�rtt jj| �rXt jj| t j� �}t jj|�sP|jt j �rT| S |} | d d� j
dd�j
dd�S | S )Nz.py� �\�.�/���)�os�path�isfile�lower�endswith�isabs�relpath�getcwd�
startswith�pardir�replace)�nameZrel_path� r �%/usr/lib64/python3.6/unittest/main.py�
_convert_name s r c C s dd� | D �S )Nc S s g | ]}t |��qS r )r )�.0r r r r �
<listcomp>. s z"_convert_names.<locals>.<listcomp>r )�namesr r r �_convert_names- s r c @ s� e Zd ZdZdZd Z Z Z ZZ dZ
ddddejddddddfdd�dd�Z
dd d
�Zdd� Zd
d� Zdd� Zdd� Zdd� Zdd� Zdd� Zddd�Zdd� ZdS )�TestProgramNr �__main__TF)� tb_localsc C s� t |t�r@t|�| _x0|jd�dd � D ]}
t| j|
�| _q(W n|| _|d krTtj}|| _|| _ | | _
|| _|
| _|| _
|d kr�tj r�d| _n|| _|| _|| _|| _tjj|d �| _| j|� | j� d S )Nr r �defaultr )�
isinstance�str�
__import__�module�split�getattr�sys�argv�exit�failfast�
catchbreak� verbosity�bufferr �warnoptions�warnings�defaultTest�
testRunner�
testLoaderr r �basename�progName� parseArgs�runTests)�selfr% r1 r) r2 r3 r* r- r+ r, r. r0 r �partr r r �__init__; s,
zTestProgram.__init__c C s4 |rt |� | jd kr| j� | j� tjd� d S )N� )�print�_discovery_parser�_initArgParsers�_print_helpr( r* )r8 �msgr r r � usageExita s
zTestProgram.usageExitc O sZ | j d kr6t| jj� � ttd| ji � | jj� n t| jj� � ttd| ji � d S )N�prog) r% r<