[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@52.15.115.199: ~ $


���]� �@s�ddlZddlZddlmZmZGdd�de�ZGdd�d�ZGdd�dej�Z	Gd	d
�d
ej�Z
edkr�ej�dS)�N)�PseudoInputFile�PseudoOutputFilec@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�ScCsdt|�jS)Nz%s:str)�type�__name__)�self�r�,/opt/alt/python35/lib64/python3.5/test_io.py�__str__sz	S.__str__cCsdt|�jS)Nz
%s:unicode)rr)rrrr	�__unicode__	sz
S.__unicode__cCsdS)N�r)rrrr	�__len__sz	S.__len__cCs
td�S)N�abc)�iter)rrrr	�__iter__
sz
S.__iter__cGsdt|�jS)Nz%s:item)rr)r�argsrrr	�__getitem__sz
S.__getitem__cGsdt|�jS)Nz%s:slice)rr)rrrrr	�__getslice__szS.__getslice__N)	r�
__module__�__qualname__r
rr
rrrrrrr	rsrc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�	MockShellcCs|j�dS)N)�reset)rrrr	�__init__szMockShell.__init__cGs|jj|�dS)N)�written�append)rrrrr	�writeszMockShell.writecCs
|jj�S)N)�lines�pop)rrrr	�readlineszMockShell.readlinecCsdS)Nr)rrrr	�closeszMockShell.closecCs
g|_dS)N)r)rrrr	r!szMockShell.resetcCs t|�ddd�|_dS)N����)�listr)rrrrr	�push$szMockShell.pushN)	rrrrrrrrr#rrrr	rsrc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�PseudeOutputFilesTestcCs�t�}t|dd�}|j|tj�|j|jd�|j|j�|j|j	�|j|j
d�|j|j�|j
|j��|j|j��|j
|j��|j|j��dS)N�stdoutzutf-8z<stdout>)rr�assertIsInstance�io�
TextIOBase�assertEqual�encoding�assertIsNone�errors�newlines�name�assertFalse�closed�
assertTrue�isatty�readable�writable�seekable)r�shell�frrr	�	test_misc)s	zPseudeOutputFilesTest.test_misccCs�t�}t|dd�}|jt|j�|jt|j�|jt|jd�|jt|jd�|jt|jd�dS)Nr%zutf-8r)	rr�assertRaises�OSError�fileno�tell�seek�readr)rr6r7rrr	�test_unsupported7s	z&PseudeOutputFilesTest.test_unsupportedcCs^t�}t|dd�}|jd�|j|jd	g�|j�|jd�|j|jd
g�|j�|jtd��|j|jdg�|jt|jdd�t�|j�|j	t
|j�|j|jg�|j	t
|jd�|j	t
|jd�|j|jg�|j	t
|jdd�|j|jg�dS)Nr%zutf-8�test�tèstrstest�{Zspam)r@r%)rAr%)rAr%)rrrr)rrrr�strr9�	TypeError)rr6r7rrr	�
test_write@s&	



!
z PseudeOutputFilesTest.test_writecCs�t�}t|dd�}|jg�|j|jg�|j�|jddg�|j|jddg�|j�|jddg�|j|jd
dg�|j�|jtd�g�|j|jdg�|jt|jdd�t�|j�|j	t
|j�|j|jg�|j	t
|jd	�|j|jg�|j	t
|jd
g�|j	t
|jd	g�|j|jg�|j	t
|jgg�|j|jg�dS)Nr%zutf-8�one
�two�onè
�twò�tèstrrBstest)rFr%)rGr%)rHr%)rIr%)rJr%)rr�
writelinesr)rrrrrCr9rD)rr6r7rrr	�test_writelinesWs4	





!
z%PseudeOutputFilesTest.test_writelinescCs�t�}t|dd�}|j|j�|jd�|j�|j|j�|jt|jd�|j	|j
dg�|j�|jt|jd�dS)Nr%zutf-8r@�xr )r@r%)rrr/r0rrr1r9�
ValueErrorr)rrD)rr6r7rrr	�
test_closeus	


z PseudeOutputFilesTest.test_closeN)rrrr8r?rErLrOrrrr	r$(s
	r$c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�PseudeInputFilesTestcCs�t�}t|dd�}|j|tj�|j|jd�|j|j�|j|j	�|j|j
d�|j|j�|j
|j��|j
|j��|j|j��|j|j��dS)N�stdinzutf-8z<stdin>)rrr&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5)rr6r7rrr	r8�s	zPseudeInputFilesTest.test_misccCs�t�}t|dd�}|jt|j�|jt|j�|jt|jd�|jt|jd�|jt|jdg�dS)NrQzutf-8rrM)	rrr9r:r;r<r=rrK)rr6r7rrr	r?�s	z%PseudeInputFilesTest.test_unsupportedcCs~t�}t|dd�}|jdddg�|j|j�d�|jdddg�|j|jd�d�|jdddg�|j|jd�d�|jddddg�|j|jd	�d
�|j|jd�d�|j|jd
�d�|jddg�|j|jd�d�|jt|jd�|jt|jd�|jt|jdd�dS)NrQzutf-8zone
ztwo
�zone
two
r zthree
��onrze
t�
z	wo
three
rg�?�1r!)rrr#r)r>r9rD)rr6r7rrr	�	test_read�s"	zPseudeInputFilesTest.test_readcCs�t�}t|dd�}|jddddg�|j|j�d�|j|jd�d�|j|jd�d�|jdg�|j|j�d�|j|j�d�|jd	d
dg�|j|j�d	�|j|j�d
�|jdddg�|j|jd�d
�|j|jd�d�|j|jd�d�|j|jd�d�|jddg�|j|jd�d�|jt|jd�|jt|jd�|jt|jdd�dS)NrQzutf-8zone
ztwo
zthree
zfour
r zone
two
ZonerGZthreerSrT�e�
rUrrRg�?rVr!)rrr#r)rr9rD�	readlines)rr6r7rrr	�
test_readline�s,	z"PseudeInputFilesTest.test_readlinecCs�t�}t|dd�}|jdddg�|j|j�ddg�|jdddg�|j|jd�ddg�|jdddg�|j|jd�ddg�|jdddg�|j|jd�ddg�|jdddg�|j|jd�dg�|jdddg�|j|jd	�ddg�|jdddg�|jt|jd
�|jt|jd�|jt|jdd�dS)
NrQzutf-8zone
ztwo
rRr rr�g�?rVr!)rrr#r)rZr9rD)rr6r7rrr	�test_readlines�s$	z#PseudeInputFilesTest.test_readlinescCs�t�}t|dd�}|jdddg�|j|j�|j|j�d�|j�|j|j�|j|j�d�|jt	|jd�dS)NrQzutf-8zone
ztwo
rRr )
rrr#r/r0r)rrr9rD)rr6r7rrr	rO�s	
zPseudeInputFilesTest.test_closeN)	rrrr8r?rWr[r]rOrrrr	rP�s	rP�__main__)
Zunittestr'Zidlelib.PyShellrrrCrrZTestCaser$rPr�mainrrrr	�<module>sZf

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 823 B 0644
__init__.cpython-35.opt-2.pyc File 496 B 0644
__init__.cpython-35.pyc File 823 B 0644
htest.cpython-35.opt-1.pyc File 11.44 KB 0644
htest.cpython-35.opt-2.pyc File 9.17 KB 0644
htest.cpython-35.pyc File 11.44 KB 0644
mock_idle.cpython-35.opt-1.pyc File 2.4 KB 0644
mock_idle.cpython-35.opt-2.pyc File 1.71 KB 0644
mock_idle.cpython-35.pyc File 2.4 KB 0644
mock_tk.cpython-35.opt-1.pyc File 11.12 KB 0644
mock_tk.cpython-35.opt-2.pyc File 6.29 KB 0644
mock_tk.cpython-35.pyc File 11.12 KB 0644
test_autocomplete.cpython-35.opt-1.pyc File 4.95 KB 0644
test_autocomplete.cpython-35.opt-2.pyc File 4.93 KB 0644
test_autocomplete.cpython-35.pyc File 4.95 KB 0644
test_autoexpand.cpython-35.opt-1.pyc File 4.13 KB 0644
test_autoexpand.cpython-35.opt-2.pyc File 4.06 KB 0644
test_autoexpand.cpython-35.pyc File 4.13 KB 0644
test_calltips.cpython-35.opt-1.pyc File 10.01 KB 0644
test_calltips.cpython-35.opt-2.pyc File 9.88 KB 0644
test_calltips.cpython-35.pyc File 10.09 KB 0644
test_config_help.cpython-35.opt-1.pyc File 4.31 KB 0644
test_config_help.cpython-35.opt-2.pyc File 4.23 KB 0644
test_config_help.cpython-35.pyc File 4.31 KB 0644
test_config_name.cpython-35.opt-1.pyc File 3.16 KB 0644
test_config_name.cpython-35.opt-2.pyc File 3.08 KB 0644
test_config_name.cpython-35.pyc File 3.16 KB 0644
test_configdialog.cpython-35.opt-1.pyc File 1.43 KB 0644
test_configdialog.cpython-35.opt-2.pyc File 1.27 KB 0644
test_configdialog.cpython-35.pyc File 1.43 KB 0644
test_delegator.cpython-35.opt-1.pyc File 1.1 KB 0644
test_delegator.cpython-35.opt-2.pyc File 1.09 KB 0644
test_delegator.cpython-35.pyc File 1.1 KB 0644
test_editmenu.cpython-35.opt-1.pyc File 2.88 KB 0644
test_editmenu.cpython-35.opt-2.pyc File 2.48 KB 0644
test_editmenu.cpython-35.pyc File 2.88 KB 0644
test_editor.cpython-35.opt-1.pyc File 1.19 KB 0644
test_editor.cpython-35.opt-2.pyc File 1.17 KB 0644
test_editor.cpython-35.pyc File 1.19 KB 0644
test_formatparagraph.cpython-35.opt-1.pyc File 12.41 KB 0644
test_formatparagraph.cpython-35.opt-2.pyc File 11.65 KB 0644
test_formatparagraph.cpython-35.pyc File 12.41 KB 0644
test_grep.cpython-35.opt-1.pyc File 3.08 KB 0644
test_grep.cpython-35.opt-2.pyc File 2.54 KB 0644
test_grep.cpython-35.pyc File 3.08 KB 0644
test_help_about.cpython-35.opt-1.pyc File 1.96 KB 0644
test_help_about.cpython-35.opt-2.pyc File 1.82 KB 0644
test_help_about.cpython-35.pyc File 1.96 KB 0644
test_hyperparser.cpython-35.opt-1.pyc File 8 KB 0644
test_hyperparser.cpython-35.opt-2.pyc File 7.81 KB 0644
test_hyperparser.cpython-35.pyc File 8 KB 0644
test_idlehistory.cpython-35.opt-1.pyc File 6.72 KB 0644
test_idlehistory.cpython-35.opt-2.pyc File 6.57 KB 0644
test_idlehistory.cpython-35.pyc File 6.72 KB 0644
test_io.cpython-35.opt-1.pyc File 8.76 KB 0644
test_io.cpython-35.opt-2.pyc File 8.75 KB 0644
test_io.cpython-35.pyc File 8.76 KB 0644
test_parenmatch.cpython-35.opt-1.pyc File 4.06 KB 0644
test_parenmatch.cpython-35.opt-2.pyc File 3.61 KB 0644
test_parenmatch.cpython-35.pyc File 4.06 KB 0644
test_pathbrowser.cpython-35.opt-1.pyc File 1.31 KB 0644
test_pathbrowser.cpython-35.opt-2.pyc File 1.29 KB 0644
test_pathbrowser.cpython-35.pyc File 1.31 KB 0644
test_percolator.cpython-35.opt-1.pyc File 5.18 KB 0644
test_percolator.cpython-35.opt-2.pyc File 5.13 KB 0644
test_percolator.cpython-35.pyc File 5.18 KB 0644
test_replacedialog.cpython-35.opt-1.pyc File 7.5 KB 0644
test_replacedialog.cpython-35.opt-2.pyc File 7.43 KB 0644
test_replacedialog.cpython-35.pyc File 7.5 KB 0644
test_rstrip.cpython-35.opt-1.pyc File 1.55 KB 0644
test_rstrip.cpython-35.opt-2.pyc File 1.54 KB 0644
test_rstrip.cpython-35.pyc File 1.55 KB 0644
test_searchdialog.cpython-35.opt-1.pyc File 2.42 KB 0644
test_searchdialog.cpython-35.opt-2.pyc File 2.34 KB 0644
test_searchdialog.cpython-35.pyc File 2.42 KB 0644
test_searchdialogbase.cpython-35.opt-1.pyc File 5.79 KB 0644
test_searchdialogbase.cpython-35.opt-2.pyc File 5.58 KB 0644
test_searchdialogbase.cpython-35.pyc File 5.79 KB 0644
test_searchengine.cpython-35.opt-1.pyc File 10.7 KB 0644
test_searchengine.cpython-35.opt-2.pyc File 10.61 KB 0644
test_searchengine.cpython-35.pyc File 10.7 KB 0644
test_text.cpython-35.opt-1.pyc File 6.86 KB 0644
test_text.cpython-35.opt-2.pyc File 6.84 KB 0644
test_text.cpython-35.pyc File 6.86 KB 0644
test_textview.cpython-35.opt-1.pyc File 3.86 KB 0644
test_textview.cpython-35.opt-2.pyc File 3.53 KB 0644
test_textview.cpython-35.pyc File 3.86 KB 0644
test_undodelegator.cpython-35.opt-1.pyc File 4.57 KB 0644
test_undodelegator.cpython-35.opt-2.pyc File 4.3 KB 0644
test_undodelegator.cpython-35.pyc File 4.57 KB 0644
test_warning.cpython-35.opt-1.pyc File 2.84 KB 0644
test_warning.cpython-35.opt-2.pyc File 2.5 KB 0644
test_warning.cpython-35.pyc File 2.84 KB 0644
test_widgetredir.cpython-35.opt-1.pyc File 5.49 KB 0644
test_widgetredir.cpython-35.opt-2.pyc File 5.4 KB 0644
test_widgetredir.cpython-35.pyc File 5.49 KB 0644