__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.216.7: ~ $
3

� f�8�@s�dZddlmZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddlZddlm
Z
ejjZe
jd�e
jd�e
jd�e
jd�d	�Zd
ZGdd�d�ZGd
d�dej�ZGdd�dej�Zedkr�ejdd�dS)zTest codecontext, coverage 100%�)�codecontextN)�requires)�Tk�Frame�Text�TclError)�mock)�config�)�mainZ	highlight�keys�
extensionsz�
class C1():
    # Class comment.
    def __init__(self, a, b):
        self.a = a
        self.b = b
    def compare(self):
        if a > b:
            return a
        elif a < b:
            return b
        else:
            return None
c@seZdZdd�ZdS)�DummyEditwincCs||_||_||_||_dS)N)�root�topZ
text_frame�text)�selfr�framer�r�G/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_codecontext.py�__init__&szDummyEditwin.__init__N)�__name__�
__module__�__qualname__rrrrrr%src@s�eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zejjejd�dd��Zdd�ZdS)�CodeContextTestcCs~td�t�}|_|j�t|�}|_t|�}|_|jdt	�|j
dddd�|j
dddd�t|||�|_t
tj_dS)NZguiz1.0�leftZboth�)ZsideZfill�expandr)rrrZwithdrawrrrr�insert�code_sampleZpackr�editor�testcfgr�idleConf�userCfg)�clsrrrrrr�
setUpClass/szCodeContextTest.setUpClasscCs@ttj_|jjjdd�|`|`|`|jj	�|jj
�|`dS)Nz1.0�end)�usercfgrr"r#r r�deleterrZupdate_idletasks�destroy)r$rrr�
tearDownClass=s

zCodeContextTest.tearDownClasscCs|jjd�tj|j�|_dS)Nr)r�yviewr�CodeContextr �cc)rrrr�setUpFszCodeContextTest.setUpcCs,|jjr|jjj�|jj�|j`|`dS)N)r-�contextr)�__del__)rrrr�tearDownJs
zCodeContextTest.tearDowncCs�|j}|j}|j}||j|�||j|j�||j|jd�|j|j�||jd
g�||j	d�||j
jjdd|jj
�dd�||j
jjdd|jj�dd�dS)N�fontrrr
F�after�infoZtimer���)rr5r
F)�assertEqualr r-Zeditwinr�textfont�assertIsNoner/r4�
topvisibler�tk�call�t1�t2)r�eqZedr-rrr�	test_initQs zCodeContextTest.test_initcCs�|jj�|jt��(}|jjjdd|jj�|jd|�WdQRX|jt��(}|jjjdd|jj	�|jd|�WdQRX|j`|j`	|jj�dS)Nr3r4z
doesn't exist)
r-r0�assertRaisesrrr:r;r<ZassertInr=)r�msgrrr�test_del_s
zCodeContextTest.test_delcCs4tjj�|j|jjddd��|j|jjd�dS)NZ	lightgrayz#000000)�
background�
foreground�)rr,�reloadr6r-�colors�
context_depth)rrrr�test_reloadls

zCodeContextTest.test_reloadcCs�|j}|j}|j}|jr|�||�d�|j|j�||jd|j�||jd|jd�||jd|jd�||jjdd�d	�||�d�|j|j�dS)
N�breakr2ZfgrDZbgrCz1.0zend-1cr
)	r6r-�toggle_code_context_eventr/ZassertIsNotNoner7rG�getr8)rr>r-Ztogglerrr�test_toggle_code_context_eventrsz.CodeContextTest.test_toggle_code_context_eventcCs.|j}|jj}|jt��|ddd�WdQRX||d�dgdf�||d�dgdf�||d	�ddgdf�||d�dddgdf�||d�dddd gdf�||ddd�d!d"d#d$gdf�||ddd�d%d&d'gdf�||ddd�d(d)gdf�||ddd�d*d+d,gdf�||ddd�d-d.gdf�dS)/Nrr)Zstopline���class C1():�class���    def __init__(self, a, b):�def�
��    def compare(self):��        if a > b:�if��        elif a < b:�elif)Z
stopindent)rOrrPrQ)rOrrPrQ)rOrrPrQ)rRrRrTrU)rOrrPrQ)rWrRrXrU)rYrYrZr[)rOrrPrQ)rWrRrXrU)rYrYrZr[)rVrYr]r^)rOrrPrQ)rWrRrXrU)rYrYrZr[)rVrYr]r^)rWrRrXrU)rYrYrZr[)rVrYr]r^)rYrYrZr[)rVrYr]r^)rWrRrXrU)rYrYrZr[)rVrYr]r^)rYrYrZr[)rVrYr]r^)r6r-Zget_contextr@�AssertionError)rr>�gcrrr�test_get_context�s:


z CodeContextTest.test_get_contextc
Cs*|j}|j}|js|j�|j|j��||jdg�||jd�|jj	d�|j�||jdg�||jd�||jj
dd�d�|jj	d�|j�||jd!d"g�||jd
�||jj
dd�d�|jj	d
�|j�||jd$d%g�||jd�||jj
dd�d�|jj	d�|j�||jd'd(d)g�||jd�||jj
dd�d�|jj	d�|j�||jd+d,d-d.d/g�||jd�||jj
dd�d�|j�d|_||jd1d2d3d4d5g�||jd�||jj
dd�d�|jj	d�|j�||jd7d8d9g�||jd�||jj
dd�d�dS):Nrrr
FrOz1.0zend-1c�class C1():rQrNrR�    def __init__(self, a, b):rUrSz)class C1():
    def __init__(self, a, b):r\rW�    def compare(self):rY�        if a > b:r[rV�        elif a < b:r^�zHclass C1():
    def compare(self):
        if a > b:
        elif a < b:�r5)rr5r
Fr5)rr5r
Fr5)rr5r
F)rOrrbrQr5)rr5r
F)rOrrbrQr5)rr5r
F)rOrrbrQ)rRrRrcrUr5)rr5r
F)rOrrbrQ)rWrRrdrU)rYrYrer[)rVrYrfr^r5)rr5r
F)rOrrbrQ)rWrRrdrU)rYrYrer[)rVrYrfr^r5)rr5r
F)rOrrbrQ)rRrRrcrU)r6r-r/rKr8�update_code_contextr4r9rr+rLrH)rr>r-rrr�test_update_code_context�slz(CodeContextTest.test_update_code_contextcCs�|j}|j}|j}|js |j�|jjd�d��|j�||jd�|jj	dd�|�||jd�|jjd�d��|j�||jd�|jj	dd�|�||jd�d|_
|jjd�d��|j�||jd�|jj	dd	�|�||jd�dS)
NrOz.0rz1.5rrgz3.0rYz1.0)r6r-Z
jumptoliner/rKrr+rir9Zmark_setrH)rr>r-Zjumprrr�test_jumptolines0zCodeContextTest.test_jumptolinericCsD|jjr|jj�|jj�|j�|jj�|jj�|j�dS)N)r-r/rKZtimer_eventZassert_not_calledZ
assert_called)rZmock_updaterrr�test_timer_event)s



z CodeContextTest.test_timer_eventcCs�|j}|j}|jd}tjj}d}ddd�}|jr:|j�||jd<|tj_|j�||j	|�||j
|�|j�||jd<|tj_|j�||j	|�||j
|�||jd|�||jd|d�||jd|d�||jd<|j�||j	|�||j
|�||jd|�||jd|d�||jd|d�||jd<|tj_|j�||j	|�||j
|�||jd|�||jd|d�||jd|d�|tj_|j�dS)Nr2ZFakeFontz#222222z#ffff00)rCrDrCrD)r6r-rrr,rGr/rKZconfig_timer_eventr7Z
contextcolors)rr>r-Z	save_fontZsave_colorsZ	test_fontZtest_colorsrrr�test_config_timer_event6sN





z'CodeContextTest.test_config_timer_eventN)rrr�classmethodr%r*r.r1r?rBrIrMrarjrkrZpatch�objectrr,rlrmrrrrr-s	
0Q!
rc@seZdZdd�Zdd�ZdS)�HelperFunctionTextc	CsJtj}d}x |D]\}}|j||�|�qW|j|d
tjd�d�d �dS)!N�    first word�    �first�	first word�	�
  ᧔᧒: �  �᧔᧒�	no spacesr
�no�# TEST COMMENT�    (continuation)z^(\s*)([^\s]*))�c�(continuation)�rrrs�rqr�rurs�rtr��rwrx�rvr��r
rz�ryr��r
r
�r
r��r
r
�r{r��rrr
�r|r�)r�r�r�r�r�r�r�)rrr~)rZget_spaces_firstwordr6�re�compile)rrLZ
test_lines�lineZexpected_outputrrr�test_get_spaces_firstwordlsz,HelperFunctionText.test_get_spaces_firstwordcCs�|j}tj}tj�}|||d�tjddf�|||d�d�|||d�tjddf�|||d	�d�|||d
�d�||d�d�dS)Nrr
Fr�class C1():rQrOz    # Class comment.rNrR�    def __init__(self, a, b):rUrWrY�        if a > b:r[�	if a == b:)rr�rQ)rRr�rU)rYr�r[)rr�r[)r6rZ
get_line_infor�
splitlinesZINFINITY)rr>Zgli�linesrrr�test_get_line_infosz%HelperFunctionText.test_get_line_infoN)rrrr�r�rrrrrpjsrp�__main__rO)�	verbosity)�__doc__ZidlelibrZunittestZtest.supportrZtkinterrrrrrr�r	r"r#r'ZIdleUserConfParserr!rrZTestCaserrprrrrrr�<module>s(?(

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 850 B 0644
__init__.cpython-36.opt-2.pyc File 463 B 0644
__init__.cpython-36.pyc File 850 B 0644
htest.cpython-36.opt-1.pyc File 11 KB 0644
htest.cpython-36.opt-2.pyc File 8.74 KB 0644
htest.cpython-36.pyc File 11 KB 0644
mock_idle.cpython-36.opt-1.pyc File 2.53 KB 0644
mock_idle.cpython-36.opt-2.pyc File 1.66 KB 0644
mock_idle.cpython-36.pyc File 2.53 KB 0644
mock_tk.cpython-36.opt-1.pyc File 10.54 KB 0644
mock_tk.cpython-36.opt-2.pyc File 5.72 KB 0644
mock_tk.cpython-36.pyc File 10.54 KB 0644
template.cpython-36.opt-1.pyc File 1.02 KB 0644
template.cpython-36.opt-2.pyc File 994 B 0644
template.cpython-36.pyc File 1.02 KB 0644
test_autocomplete.cpython-36.opt-1.pyc File 4.51 KB 0644
test_autocomplete.cpython-36.opt-2.pyc File 4.44 KB 0644
test_autocomplete.cpython-36.pyc File 4.51 KB 0644
test_autocomplete_w.cpython-36.opt-1.pyc File 1.26 KB 0644
test_autocomplete_w.cpython-36.opt-2.pyc File 1.19 KB 0644
test_autocomplete_w.cpython-36.pyc File 1.26 KB 0644
test_autoexpand.cpython-36.opt-1.pyc File 3.82 KB 0644
test_autoexpand.cpython-36.opt-2.pyc File 3.75 KB 0644
test_autoexpand.cpython-36.pyc File 3.82 KB 0644
test_browser.cpython-36.opt-1.pyc File 8.66 KB 0644
test_browser.cpython-36.opt-2.pyc File 8.52 KB 0644
test_browser.cpython-36.pyc File 8.66 KB 0644
test_calltip.cpython-36.opt-1.pyc File 11.14 KB 0644
test_calltip.cpython-36.opt-2.pyc File 10.97 KB 0644
test_calltip.cpython-36.pyc File 11.21 KB 0644
test_calltip_w.cpython-36.opt-1.pyc File 1.22 KB 0644
test_calltip_w.cpython-36.opt-2.pyc File 1.15 KB 0644
test_calltip_w.cpython-36.pyc File 1.22 KB 0644
test_codecontext.cpython-36.opt-1.pyc File 10.15 KB 0644
test_codecontext.cpython-36.opt-2.pyc File 10.09 KB 0644
test_codecontext.cpython-36.pyc File 10.15 KB 0644
test_colorizer.cpython-36.opt-1.pyc File 2.17 KB 0644
test_colorizer.cpython-36.opt-2.pyc File 2.11 KB 0644
test_colorizer.cpython-36.pyc File 2.17 KB 0644
test_config.cpython-36.opt-1.pyc File 25.25 KB 0644
test_config.cpython-36.opt-2.pyc File 24.42 KB 0644
test_config.cpython-36.pyc File 25.25 KB 0644
test_config_key.cpython-36.opt-1.pyc File 4.53 KB 0644
test_config_key.cpython-36.opt-2.pyc File 4.41 KB 0644
test_config_key.cpython-36.pyc File 4.53 KB 0644
test_configdialog.cpython-36.opt-1.pyc File 36.63 KB 0644
test_configdialog.cpython-36.opt-2.pyc File 35.69 KB 0644
test_configdialog.cpython-36.pyc File 36.63 KB 0644
test_debugger.cpython-36.opt-1.pyc File 1.06 KB 0644
test_debugger.cpython-36.opt-2.pyc File 1 KB 0644
test_debugger.cpython-36.pyc File 1.06 KB 0644
test_debugger_r.cpython-36.opt-1.pyc File 697 B 0644
test_debugger_r.cpython-36.opt-2.pyc File 632 B 0644
test_debugger_r.cpython-36.pyc File 697 B 0644
test_debugobj.cpython-36.opt-1.pyc File 2.64 KB 0644
test_debugobj.cpython-36.opt-2.pyc File 2.58 KB 0644
test_debugobj.cpython-36.pyc File 2.64 KB 0644
test_debugobj_r.cpython-36.opt-1.pyc File 1.08 KB 0644
test_debugobj_r.cpython-36.opt-2.pyc File 1.02 KB 0644
test_debugobj_r.cpython-36.pyc File 1.08 KB 0644
test_delegator.cpython-36.opt-1.pyc File 1.04 KB 0644
test_delegator.cpython-36.opt-2.pyc File 1004 B 0644
test_delegator.cpython-36.pyc File 1.04 KB 0644
test_editmenu.cpython-36.opt-1.pyc File 2.75 KB 0644
test_editmenu.cpython-36.opt-2.pyc File 2.36 KB 0644
test_editmenu.cpython-36.pyc File 2.75 KB 0644
test_editor.cpython-36.opt-1.pyc File 1.96 KB 0644
test_editor.cpython-36.opt-2.pyc File 1.9 KB 0644
test_editor.cpython-36.pyc File 1.96 KB 0644
test_filelist.cpython-36.opt-1.pyc File 1.28 KB 0644
test_filelist.cpython-36.opt-2.pyc File 1.22 KB 0644
test_filelist.cpython-36.pyc File 1.28 KB 0644
test_grep.cpython-36.opt-1.pyc File 2.88 KB 0644
test_grep.cpython-36.opt-2.pyc File 2.34 KB 0644
test_grep.cpython-36.pyc File 2.88 KB 0644
test_help.cpython-36.opt-1.pyc File 1.37 KB 0644
test_help.cpython-36.opt-2.pyc File 1.25 KB 0644
test_help.cpython-36.pyc File 1.37 KB 0644
test_help_about.cpython-36.opt-1.pyc File 6.48 KB 0644
test_help_about.cpython-36.opt-2.pyc File 5.79 KB 0644
test_help_about.cpython-36.pyc File 6.48 KB 0644
test_history.cpython-36.opt-1.pyc File 6.16 KB 0644
test_history.cpython-36.opt-2.pyc File 5.98 KB 0644
test_history.cpython-36.pyc File 6.16 KB 0644
test_hyperparser.cpython-36.opt-1.pyc File 7.13 KB 0644
test_hyperparser.cpython-36.opt-2.pyc File 6.95 KB 0644
test_hyperparser.cpython-36.pyc File 7.13 KB 0644
test_iomenu.cpython-36.opt-1.pyc File 1.31 KB 0644
test_iomenu.cpython-36.opt-2.pyc File 1.26 KB 0644
test_iomenu.cpython-36.pyc File 1.31 KB 0644
test_macosx.cpython-36.opt-1.pyc File 3.76 KB 0644
test_macosx.cpython-36.opt-2.pyc File 3.36 KB 0644
test_macosx.cpython-36.pyc File 3.83 KB 0644
test_mainmenu.cpython-36.opt-1.pyc File 1.12 KB 0644
test_mainmenu.cpython-36.opt-2.pyc File 1.05 KB 0644
test_mainmenu.cpython-36.pyc File 1.12 KB 0644
test_multicall.cpython-36.opt-1.pyc File 1.48 KB 0644
test_multicall.cpython-36.opt-2.pyc File 1.42 KB 0644
test_multicall.cpython-36.pyc File 1.48 KB 0644
test_outwin.cpython-36.opt-1.pyc File 5.42 KB 0644
test_outwin.cpython-36.opt-2.pyc File 5.36 KB 0644
test_outwin.cpython-36.pyc File 5.42 KB 0644
test_paragraph.cpython-36.opt-1.pyc File 11.63 KB 0644
test_paragraph.cpython-36.opt-2.pyc File 10.83 KB 0644
test_paragraph.cpython-36.pyc File 11.63 KB 0644
test_parenmatch.cpython-36.opt-1.pyc File 3.84 KB 0644
test_parenmatch.cpython-36.opt-2.pyc File 3.44 KB 0644
test_parenmatch.cpython-36.pyc File 3.84 KB 0644
test_pathbrowser.cpython-36.opt-1.pyc File 3.21 KB 0644
test_pathbrowser.cpython-36.opt-2.pyc File 3.15 KB 0644
test_pathbrowser.cpython-36.pyc File 3.21 KB 0644
test_percolator.cpython-36.opt-1.pyc File 4.76 KB 0644
test_percolator.cpython-36.opt-2.pyc File 4.69 KB 0644
test_percolator.cpython-36.pyc File 4.76 KB 0644
test_pyparse.cpython-36.opt-1.pyc File 14.05 KB 0644
test_pyparse.cpython-36.opt-2.pyc File 13.99 KB 0644
test_pyparse.cpython-36.pyc File 14.05 KB 0644
test_pyshell.cpython-36.opt-1.pyc File 1.18 KB 0644
test_pyshell.cpython-36.opt-2.pyc File 1.12 KB 0644
test_pyshell.cpython-36.pyc File 1.18 KB 0644
test_query.cpython-36.opt-1.pyc File 14.69 KB 0644
test_query.cpython-36.opt-2.pyc File 13.9 KB 0644
test_query.cpython-36.pyc File 14.69 KB 0644
test_redirector.cpython-36.opt-1.pyc File 5 KB 0644
test_redirector.cpython-36.opt-2.pyc File 4.93 KB 0644
test_redirector.cpython-36.pyc File 5 KB 0644
test_replace.cpython-36.opt-1.pyc File 6.73 KB 0644
test_replace.cpython-36.opt-2.pyc File 6.67 KB 0644
test_replace.cpython-36.pyc File 6.73 KB 0644
test_rpc.cpython-36.opt-1.pyc File 1.61 KB 0644
test_rpc.cpython-36.opt-2.pyc File 1.55 KB 0644
test_rpc.cpython-36.pyc File 1.61 KB 0644
test_rstrip.cpython-36.opt-1.pyc File 1.46 KB 0644
test_rstrip.cpython-36.opt-2.pyc File 1.39 KB 0644
test_rstrip.cpython-36.pyc File 1.46 KB 0644
test_run.cpython-36.opt-1.pyc File 9.21 KB 0644
test_run.cpython-36.opt-2.pyc File 9.15 KB 0644
test_run.cpython-36.pyc File 9.21 KB 0644
test_runscript.cpython-36.opt-1.pyc File 1.29 KB 0644
test_runscript.cpython-36.opt-2.pyc File 1.22 KB 0644
test_runscript.cpython-36.pyc File 1.29 KB 0644
test_scrolledlist.cpython-36.opt-1.pyc File 1.05 KB 0644
test_scrolledlist.cpython-36.opt-2.pyc File 1009 B 0644
test_scrolledlist.cpython-36.pyc File 1.05 KB 0644
test_search.cpython-36.opt-1.pyc File 2.42 KB 0644
test_search.cpython-36.opt-2.pyc File 2.36 KB 0644
test_search.cpython-36.pyc File 2.42 KB 0644
test_searchbase.cpython-36.opt-1.pyc File 4.96 KB 0644
test_searchbase.cpython-36.opt-2.pyc File 4.9 KB 0644
test_searchbase.cpython-36.pyc File 4.96 KB 0644
test_searchengine.cpython-36.opt-1.pyc File 9.59 KB 0644
test_searchengine.cpython-36.opt-2.pyc File 9.53 KB 0644
test_searchengine.cpython-36.pyc File 9.59 KB 0644
test_squeezer.cpython-36.opt-1.pyc File 15.12 KB 0644
test_squeezer.cpython-36.opt-2.pyc File 13.6 KB 0644
test_squeezer.cpython-36.pyc File 15.12 KB 0644
test_stackviewer.cpython-36.opt-1.pyc File 1.5 KB 0644
test_stackviewer.cpython-36.opt-2.pyc File 1.44 KB 0644
test_stackviewer.cpython-36.pyc File 1.5 KB 0644
test_statusbar.cpython-36.opt-1.pyc File 1.52 KB 0644
test_statusbar.cpython-36.opt-2.pyc File 1.46 KB 0644
test_statusbar.cpython-36.pyc File 1.52 KB 0644
test_text.cpython-36.opt-1.pyc File 6.42 KB 0644
test_text.cpython-36.opt-2.pyc File 6.23 KB 0644
test_text.cpython-36.pyc File 6.42 KB 0644
test_textview.cpython-36.opt-1.pyc File 6.96 KB 0644
test_textview.cpython-36.opt-2.pyc File 6.65 KB 0644
test_textview.cpython-36.pyc File 6.96 KB 0644
test_tooltip.cpython-36.opt-1.pyc File 5.26 KB 0644
test_tooltip.cpython-36.opt-2.pyc File 5.25 KB 0644
test_tooltip.cpython-36.pyc File 5.26 KB 0644
test_tree.cpython-36.opt-1.pyc File 1.25 KB 0644
test_tree.cpython-36.opt-2.pyc File 1.19 KB 0644
test_tree.cpython-36.pyc File 1.25 KB 0644
test_undo.cpython-36.opt-1.pyc File 4.06 KB 0644
test_undo.cpython-36.opt-2.pyc File 3.85 KB 0644
test_undo.cpython-36.pyc File 4.06 KB 0644
test_warning.cpython-36.opt-1.pyc File 2.64 KB 0644
test_warning.cpython-36.opt-2.pyc File 2.3 KB 0644
test_warning.cpython-36.pyc File 2.64 KB 0644
test_window.cpython-36.opt-1.pyc File 1.56 KB 0644
test_window.cpython-36.opt-2.pyc File 1.5 KB 0644
test_window.cpython-36.pyc File 1.56 KB 0644
test_zoomheight.cpython-36.opt-1.pyc File 1.47 KB 0644
test_zoomheight.cpython-36.opt-2.pyc File 1.41 KB 0644
test_zoomheight.cpython-36.pyc File 1.47 KB 0644