[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.137.217.236: ~ $


��Yfi�@s�dZddlmZddlZddlmZddlmZmZm	Z	ddl
mZGdd�dej�Z
Gd	d
�d
ej�Zedkr�ejdd
�dS)z.Test idlelib.WidgetRedirector.

100% coverage
�)�requiresN)�Func)�Tk�Text�TclError)�WidgetRedirectorc@sLeZdZedd��Zedd��Zdd�Zdd�Zd	S)
�
InitCloseTestcCs9td�t�|_|jj�t|j�|_dS)N�gui)rr�root�withdrawr�text)�cls�r�G/opt/alt/python35/lib64/python3.5/idlelib/idle_test/test_widgetredir.py�
setUpClasss

zInitCloseTest.setUpClasscCs|`|jj�|`dS)N)rr
�destroy)r
rrr�
tearDownClasss
zInitCloseTest.tearDownClasscCsbt|j�}|j|j|j�|j|j|jj�|jtt|j�|j�dS)N)rr�assertEqual�widget�tkZassertRaisesr�close)�self�redirrrr�	test_inits
zInitCloseTest.test_initcCsYt|j�}|jdt�|j�|j|ji�|jt|jd��dS)N�insertr)	rr�registerrrr�_operations�assertFalse�hasattr)rrrrr�
test_close"s

zInitCloseTest.test_closeN)�__name__�
__module__�__qualname__�classmethodrrrrrrrrrsrc@s�eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�WidgetRedirectorTestcCs9td�t�|_|jj�t|j�|_dS)Nr	)rrr
rrr)r
rrrr,s

zWidgetRedirectorTest.setUpClasscCs*|`|jj�|jj�|`dS)N)rr
Zupdate_idletasksr)r
rrrr3s

z"WidgetRedirectorTest.tearDownClasscCsPt|j�|_t�|_|jjd|j�|_|jjdd�dS)Nr�asdf)rrrr�funcr�orig_insertr)rrrr�setUp:szWidgetRedirectorTest.setUpcCs$|jjdd�|jj�dS)Nz1.0�end)r�deleterr)rrrr�tearDown@szWidgetRedirectorTest.tearDowncCs6|jdt|j��|jdt|j��dS)NZ
RedirectorZOriginal)�assertIn�reprrr')rrrr�	test_reprDszWidgetRedirectorTest.test_reprcCs~|j|jjdd�d�|j|jjd�|jd|jj�|jd|jj�|j|jj	|j�dS)Nz1.0r)�
rr%)rr%)
rr�getr&�argsr,rr�__dict__r)rrrr�
test_registerHs
z"WidgetRedirectorTest.test_registercCsh|j|jjd�|j|jj|jjj�|jdd�|j|jjdd�d�dS)Nrr%z1.0r)zasdf
)rr'Z	operationZtk_callrr�callr0)rrrr�test_original_commandOsz*WidgetRedirectorTest.test_original_commandcCsh|j|jjd��|j|jjd�|j�|jd|jj�|jd|jj�dS)Nzinvalid operation namer)	ZassertIsNoner�
unregisterrr&ZassertNotInrrr2)rrrr�test_unregisterUsz$WidgetRedirectorTest.test_unregistercCs,|j`|j|jjd�|j�dS)Nr)rrrrr6r&)rrrr�test_unregister_no_attribute[s	z1WidgetRedirectorTest.test_unregister_no_attributecCsG|jjd�|j|jjdd��|j|jjd�dS)NTrFr)r&�__init__Z
assertTruer�dispatchrr1)rrrr�test_dispatch_intercept_sz,WidgetRedirectorTest.test_dispatch_interceptcCsU|jdd�|j|jjddd�d�|j|jjdd�d�dS)Nrr%r*z1.0r)�r/)r'rrr:rr0)rrrr�test_dispatch_bypassds"z)WidgetRedirectorTest.test_dispatch_bypasscCsR|jjt��|j|jjdd�d�|j|jjd�d�dS)NrFr<Zinvalid)r&r9rrrr:)rrrr�test_dispatch_errorjsz(WidgetRedirectorTest.test_dispatch_errorcCs�|jj|jjdd�|j|jjd�|j|jjdd�d�|jjt	��|j|jj|jjdd�d�dS)	Nr�helloz1.0r)r/Zboor<)r?)
r
r4rZ_wrr&r1r0r9r)rrrr�test_command_dispatchos
z*WidgetRedirectorTest.test_command_dispatchN)r r!r"r#rrr(r+r.r3r5r7r8r;r=r>r@rrrrr$*sr$�__main__�	verbosity�)�__doc__Ztest.supportrZunittestZidlelib.idle_test.mock_idlerZtkinterrrrZidlelib.WidgetRedirectorrZTestCaserr$r �mainrrrr�<module>sR

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