Your IP : 3.137.200.56


Current Path : /opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/test_autocomplete.cpython-34.pyc

�
e f��@s�ddlZddlmZddlmZmZddljZddl	j
Zddlj
ZddlmZddlmZGdd�d�Z
Gdd	�d	�ZGd
d�dej�Zedkr�ejd
d�ndS)�N)�requires)�Tk�Text)�Func)�Eventc@seZdZdd�ZdS)�AutoCompleteWindowcCsdS)N�rrr�H/opt/alt/python34/lib64/python3.4/idlelib/idle_test/test_autocomplete.py�completeszAutoCompleteWindow.completeN)�__name__�
__module__�__qualname__r
rrrr	rs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)�AutoCompleteTestcCsWtd�t�|_tj|jd�t|j�|_t|j|j�|_dS)NZgui)	rrr�macZsetupApprrr�editor)�clsrrr	�
setUpClasss

zAutoCompleteTest.setUpClasscCs#|jj�|`|`|`dS)N)rZdestroyrr)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_window0sz.AutoCompleteTest.test_make_autocomplete_windowcCs9|jj�|j_|jj�|j|jj�dS)N)rr"Zautocompletewindow�_remove_autocomplete_window�assertIsNone)rrrr	�test_remove_autocomplete_window4s
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_event:s	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.)	r rZtry_open_completions_eventrZ_open_completions_laterr*r�insertr)r�EqualrZtrycompletionsZo_c_lrrr	�test_try_open_completions_eventAs				


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)
r rrr&Zautocomplete_eventr2rr/r%rr)r*�result)rr0rZevr+rrr	�test_autocomplete_eventWs		
			z(AutoCompleteTest.test_autocomplete_eventcCsdS)Nr)rrrr	�test_open_completions_laterqsz,AutoCompleteTest.test_open_completions_latercCsdS)Nr)rrrr	�test_delayed_open_completionsusz.AutoCompleteTest.test_delayed_open_completionscCsdS)Nr)rrrr	�test_open_completions{sz&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,r1r5r6r7r8r9r:rrrr	rsr�__main__�	verbosityr.)ZunittestZtest.supportrZtkinterrrZidlelib.AutoCompleterrZidlelib.AutoCompleteWindowrr#Zidlelib.macosxSupportZ
macosxSupportrZidlelib.idle_test.mock_idlerZidlelib.idle_test.mock_tkrrZTestCaserr�mainrrrr	�<module>s	v

?>