Your IP : 18.226.169.169


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/test_autocomplete.cpython-35.pyc



��Yf5�@s�ddlZddlmZddlmZmZddljZddl	j
Zddlm
Z
ddlmZGdd�d�Z
Gdd	�d	�ZGd
d�dej�Zedkr�ejd
d�dS)�N)�requires)�Tk�Text)�Func)�Eventc@seZdZdd�ZdS)�AutoCompleteWindowcCsdS)N�rrr�H/opt/alt/python35/lib64/python3.5/idlelib/idle_test/test_autocomplete.py�completeszAutoCompleteWindow.completeN)�__name__�
__module__�__qualname__r
rrrr	r
src@seZdZdd�ZdS)�DummyEditwincCs1||_||_d|_d|_d|_dS)N�T)�root�textZindentwidthZtabwidthZcontext_use_ps1)�selfrrrrr	�__init__s
				zDummyEditwin.__init__N)rrr
rrrrr	rsrc@s�eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS)�AutoCompleteTestcCsDtd�t�|_t|j�|_t|j|j�|_dS)NZgui)rrrrrr�editor)�clsrrr	�
setUpClasss
zAutoCompleteTest.setUpClasscCs#|`|`|jj�|`dS)N)rrrZdestroy)rrrr	�
tearDownClass s
zAutoCompleteTest.tearDownClasscCs/|jjjdd�tj|j�|_dS)Nz1.0�end)rr�delete�ac�AutoComplete�autocomplete)rrrr	�setUp&szAutoCompleteTest.setUpcCs|j|jj|j�dS)N)�assertEqualrZeditwinr)rrrr	�	test_init*szAutoCompleteTest.test_initcCs&|jj�}|j|tj�dS)N)r�_make_autocomplete_windowZassertIsInstance�acwr)rZtestwinrrr	�test_make_autocomplete_window-sz.AutoCompleteTest.test_make_autocomplete_windowcCs9|jj�|j_|jj�|j|jj�dS)N)rr!Zautocompletewindow�_remove_autocomplete_window�assertIsNone)rrrr	�test_remove_autocomplete_window1s
z0AutoCompleteTest.test_remove_autocomplete_windowcCs<t�}||j_|jjd�|j|jd�dS)N�eventTF)TFT)rr�open_completionsZforce_open_completions_eventr�args)r�o_csrrr	�!test_force_open_completions_event7s	z2AutoCompleteTest.test_force_open_completions_eventcCs�|j}|j}|jj}t�}||_|d�||jd�|jjdd�|d�||jd	�|jjdd�|jjdd�|d�||jd
�dS)Nr'z1.0zre.F�rz"./Lib/�)FFFr,)FFFr-)	rrZtry_open_completions_eventrZ_open_completions_laterr)r�insertr)r�EqualrZtrycompletionsZo_c_lrrr	�test_try_open_completions_event>s				


z0AutoCompleteTest.test_try_open_completions_eventcCs�|j}|j}tdd�}|j|j|��|`|jjdd�||jj|�d�|j�t	�}||_
||jj|�d�||jd�d|_||jj|�d�||jd�dS)	N�mc_stateTz1.0zre.�breakF)FTT)FTT)
rrrr%Zautocomplete_eventr1rr.r$rr(r)�result)rr/rZevr*rrr	�test_autocomplete_eventTs		
			z(AutoCompleteTest.test_autocomplete_eventcCsdS)Nr)rrrr	�test_open_completions_laternsz,AutoCompleteTest.test_open_completions_latercCsdS)Nr)rrrr	�test_delayed_open_completionsrsz.AutoCompleteTest.test_delayed_open_completionscCsdS)Nr)rrrr	�test_open_completionsxsz&AutoCompleteTest.test_open_completionscCsdS)Nr)rrrr	�test_fetch_completions}sz'AutoCompleteTest.test_fetch_completionscCsdS)Nr)rrrr	�test_get_entity�sz AutoCompleteTest.test_get_entityN)rrr
�classmethodrrrr r#r&r+r0r4r5r6r7r8r9rrrr	rsr�__main__�	verbosityr-)ZunittestZtest.supportrZtkinterrrZidlelib.AutoCompleterrZidlelib.AutoCompleteWindowrr"Zidlelib.idle_test.mock_idlerZidlelib.idle_test.mock_tkrrZTestCaserr�mainrrrr	�<module>s	t

?>