403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.158
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_cmd.cpython-36.opt-2.pyc
3

�
�^s�@s�ddlZddlZddlZddlZddlZddlmZGdd�dej�ZGdd�dej	�Z
ddd�Zd	d
�Ze
dkr�dejkr�ed
�ndejkr�e�j�ne�dS)�N)�supportc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�samplecmdclasscCstd�dS)NzHello from preloop)�print)�self�r�-/opt/alt/python36/lib64/python3.6/test_cmd.py�preloop�szsamplecmdclass.preloopcCstd�dS)NzHello from postloop)r)rrrr�postloop�szsamplecmdclass.postloopcGstd�dS)Nz"This is the completedefault method)r)rZignoredrrr�completedefault�szsamplecmdclass.completedefaultcCstd�dS)Nzcomplete command)r)rrrr�complete_command�szsamplecmdclass.complete_commandcCsdS)Nr)r�srrr�do_shell�szsamplecmdclass.do_shellcCsh|j�}t|�dkr td�dSydd�|D�}Wntk
rNtd�dSXt|d|d�dS)N�z*** invalid number of argumentscSsg|]}t|��qSr)�int)�.0�irrr�
<listcomp>�sz)samplecmdclass.do_add.<locals>.<listcomp>z*** arguments should be numbersr�)�split�lenr�
ValueError)rr�lrrr�do_add�szsamplecmdclass.do_addcCstd�dS)Nzhelp text for add)r)rrrr�help_add�szsamplecmdclass.help_addcCsdS)NTr)r�argrrr�do_exit�szsamplecmdclass.do_exitN)�__name__�
__module__�__qualname__rr	r
rr
rrrrrrrrs{rc@s>eZdZGdd�dej�ZGdd�de�Zdd�Zdd�Zd	S)
�TestAlternateInputc@seZdZdd�Zdd�ZdS)zTestAlternateInput.simplecmdcCst||jd�dS)N)�file)r�stdout)r�argsrrr�do_print�sz%TestAlternateInput.simplecmd.do_printcCsdS)NTr)rr"rrr�do_EOF�sz#TestAlternateInput.simplecmd.do_EOFN)rrrr#r$rrrr�	simplecmd�sr%c@seZdZdd�ZdS)zTestAlternateInput.simplecmd2cCstd|jd�dS)Nz*** Unknown syntax: EOF)r T)rr!)rr"rrrr$�sz$TestAlternateInput.simplecmd2.do_EOFN)rrrr$rrrr�
simplecmd2�sr&cCsBtjd�}tj�}|j||d�}d|_|j�|j|j�d�dS)Nzprint test
print test2)�stdinr!Fz(Cmd) test
(Cmd) test2
(Cmd) )�io�StringIOr%�use_rawinput�cmdloop�assertMultiLineEqual�getvalue)r�input�output�cmdrrr�test_file_with_missing_final_nl�s

z2TestAlternateInput.test_file_with_missing_final_nlcCsxtjd�}tj�}|j||d�}d|_|j�|j|j�d�tjd�}tj�}||_||_|j�|j|j�d�dS)Nzprint test
print test2)r'r!Fz5(Cmd) test
(Cmd) test2
(Cmd) *** Unknown syntax: EOF
zprint 

z,(Cmd) 
(Cmd) 
(Cmd) *** Unknown syntax: EOF
)	r(r)r&r*r+r,r-r'r!)rr.r/r0rrr�test_input_reset_at_EOF�s



z*TestAlternateInput.test_input_reset_at_EOFN)	rrrr0�Cmdr%r&r1r2rrrrr�s	rcCs&ddlm}tj||�tjt�dS)Nr)�test_cmd)�testr4rZrun_doctestZrun_unittestr)�verboser4rrr�	test_main�sr7cCsPtjd�}|jtjtjgddd�}|jd�|j�}td�|j	dd|d�dS)	N�tracerr)Z
ignoredirsr8�countz4import importlib; importlib.reload(cmd); test_main()zWriting coverage results...T)Zshow_missingZsummary�coverdir)
r�
import_moduleZTrace�sys�base_prefix�base_exec_prefixZrun�resultsrZ
write_results)r:r8Ztracer�rrrr�
test_coverage�s


rA�__main__z-cz/tmp/cmd.coverz-i)N)r0r<�reZunittestr(r5rr3rZTestCaserr7rAr�argvr+rrrr�<module>s 3
	




Youez - 2016 - github.com/yon3zu
LinuXploit