[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.139.86.53: ~ $


��YfR�@s�dZddlmZed�ddlZddlZddlmZddlmZ	ddl
mZddlm
Z
d	d
�Zdd�ZGd
d�de	j�ZGdd�dej�ZGdd�dej�Zedkr�ejdd�dS)a+Test idlelib.textView.

Since all methods and functions create (or destroy) a TextViewer, which
is a widget containing multiple widgets, all tests must be gui tests.
Using mock Text would not change this.  Other mocks are used to retrieve
information about calls.

The coverage is essentially 100%.
�)�requiresZguiN)�Tk)�textView)�Func)�MboxcCst�atj�dS)N)r�rootZwithdraw�rr�D/opt/alt/python35/lib64/python3.5/idlelib/idle_test/test_textview.py�setUpModules	r
cCstj�tj�bdS)N)rZupdate_idletasks�destroyrrrr	�tearDownModules

rc@s+eZdZe�Ze�Ze�ZdS)�TVN)�__name__�
__module__�__qualname__r�	transient�grab_set�wait_windowrrrr	r
 s		r
c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�TextViewTestcCs+tjj�tjj�tjj�dS)N)r
r�__init__rr)�selfrrr	�setUp's

zTextViewTest.setUpcCsYttdd�}|jtjj�|jtjj�|jtjj�|j�dS)N�Titlez	test text)r
r�
assertTruer�calledrr�Ok)r�viewrrr	�test_init_modal,s
zTextViewTest.test_init_modalcCs_ttdddd�}|jtjj�|jtjj�|jtjj�|j�dS)Nrz	test text�modalF)r
rZassertFalserrrrr)rrrrr	�test_init_nonmodal3s
zTextViewTest.test_init_nonmodalcCsUttdddd�}t�|_|j�|j|jj�|`|j�dS)Nrz	test textrF)r
rrrrrr)rrrrr	�test_ok:s
zTextViewTest.test_okN)rrrrrrr rrrr	r%src@sLeZdZedd��Zedd��Zdd�Zdd�Zd	S)
�textviewTestcCstj|_tt_dS)N)�tv�tkMessageBox�	orig_mboxr)�clsrrr	�
setUpClassEsztextviewTest.setUpClasscCs|jt_|`dS)N)r$r"r#)r%rrr	�
tearDownClassJsztextviewTest.tearDownClasscCs<tjtdddd�}|j|tj�|j�dS)Nrz	test textrF)r"Z	view_textr�assertIsInstance�
TextViewerr)rrrrr	�test_view_textOsztextviewTest.test_view_textcCs�tjjt�}tjj|d�}tjtd|dd�}|j|tj	�|j
d|jjdd��|j
�tjj|d�}tjtd|dd�}|j|�dS)	Nztest_textview.pyrrFZTestz1.0z1.endz../notthere.py)�os�path�dirname�__file__�joinr"Z	view_filerr(r)ZassertInr�getrZassertIsNone)rZtest_dirZtestfilerrrr	�test_view_fileUs
ztextviewTest.test_view_fileN)rrr�classmethodr&r'r*r1rrrr	r!Csr!�__main__�	verbosity�)�__doc__Ztest.supportrZunittestr+ZtkinterrZidlelibrr"Zidlelib.idle_test.mock_idlerZidlelib.idle_test.mock_tkrr
rr)r
ZTestCaserr!r�mainrrrr	�<module>	s
 

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