$13 GRAYBYTE WORDPRESS FILE MANAGER $28

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/

HOME
Current File : /opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__//test_searchengine.cpython-34.pyc
�
e f�,�@s�dZddlZddlZddlmZmZmZddljZ	ddl
mZddl
mZmZddl
mZdd�Zd	d
�ZGdd�d�ZGd
d�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�Zedkr~ejdddd�ndS)z9Test functions and SearchEngine class in SearchEngine.py.�N)�
BooleanVar�	StringVar�TclError)�SearchEngine)�Var�Mbox)�TextcCstt_tt_tt_dS)N)r�serrr�tkMessageBox�rr�H/opt/alt/python34/lib64/python3.4/idlelib/idle_test/test_searchengine.py�setUpModules		r
cCstt_tt_tt_dS)N)rr	rr
rrrr�tearDownModules		rc@seZdZdd�ZdS)�MockcOsdS)Nr)�self�args�kwargsrrr�__init__sz
Mock.__init__N)�__name__�
__module__�__qualname__rrrrrrsrc@seZdZdd�ZdS)�GetTestcCs~tj}tt_z[t�}tj|�}|j|tj�|j|j|�|jtj|�|�Wd|t_XdS)N)r	rr�getZassertIsInstanceZassertIsZ
_searchengine)rZsaved_Engine�root�enginerrr�test_get#s			zGetTest.test_getN)rrrrrrrrr!src@seZdZdd�ZdS)�GetLineColTestcCsb|jtjd�d�|jtjd�d	�|jttjd�|jttjd�dS)
Nz1.0�rz1.11�z1.0 lineend�end)rr)rr)�assertEqualr	Zget_line_colZassertRaises�
ValueError)rrrr�test_get_line_col1sz GetLineColTest.test_get_line_colN)rrrr"rrrrr/src@seZdZdd�ZdS)�GetSelectionTestcCsyt�}|jdd�dd�}||_|jtj|�d	�dd�}||_|jtj|�d
�dS)N�1.0zHello World!cSs*|dkrdS|dkr dSt�dS)Nz	sel.firstz1.0zsel.lastz1.12)r)�srrr�selKs
z0GetSelectionTest.test_get_selection.<locals>.sel�1.12cSs|dkrdSt�dS)N�insertz1.5)r)r%rrr�markSsz1GetSelectionTest.test_get_selection.<locals>.mark�1.5)r$r')r*r*)�mockTextr(�indexr r	Z
get_selection)r�textr&r)rrr�test_get_selectionEs			z#GetSelectionTest.test_get_selectionN)rrrr.rrrrr#8s
r#c@seZdZdd�ZdS)�ReverseSearchTestcCs�|j}d}tjd�}|tj||t|��j�d	�|tj||d�j�d
�|tj||d�j�d�|tj||d�j�d�|tj||d�d�dS)
NzHere is an 'is' test text.�is���
���)r1r2)r1r2)r4r5)r4r5)r �re�compiler	Zsearch_reverse�len�span)r�Equal�line�progrrr�test_search_reverse]s	("""z%ReverseSearchTest.test_search_reverseN)rrrr>rrrrr/[sr/c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�SearchEngineTestcCstjdd�|_dS)Nr)r	rr)rrrr�setUpkszSearchEngineTest.setUpcCsW|j}|j}||j�d�|jd�||j�d�||j�d�|jjd�||j�d�||j�d�|jjd�||j�d�||j	�d�|j
jd�||j	�d�||j�d�|jjd�||j�d�||j
�d�|jjd�||j
�d�dS)N��helloFrTr)rr �getpat�setpatZisre�revar�setZiscase�casevarZisword�wordvarZiswrap�wrapvarZisback�backvar)rrr;rrr�test_is_getps(		
zSearchEngineTest.test_is_getcCsc|j}|jd�|j|j�d�|jjd�|jd�|j|j�d�dS)Nz\srz\\s)rZsetcookedpatr rCrErF)rrrrr�test_setcookedpat�s	

z"SearchEngineTest.test_setcookedpatcCs�|j}|j}||j�d�|jd�||j�d�|jjd�||j�d�|jjd�|jd�||j�d�|jjd�||j�d�dS)NrArBTz	\bhello\bFz\sz\\s)rr ZgetcookedpatrDrHrFrE)rrr;rrr�test_getcookedpat�s		

z"SearchEngineTest.test_getcookedpatcCs�|j}|j}|jd�|j�}||jtjdtj�j�|jj	d�|j�}||jtjd�jd�|jd�||j�d�|jd�|j
j	d�||j�d�|jtjj
d�dS)NZHellorrrA�+z#Error: nothing to repeat
Pattern: +)rr rDZgetprog�patternr7r8�
IGNORECASErGrFrEr�	showerror�message)rrr;Ztemppatrrr�test_getprog�s		
"

zSearchEngineTest.test_getprogcCs�tj}|j}d}d}||jj||�d�||jd�d|d}||j|�||jj||d�d�||jd�|d7}||j|�dS)Nz[a-zz$unexpected end of regular expressionzRegular expression errorzError: z
Pattern: [a-zr4z

Offset: 5)rrQr rZreport_error�titlerR)rrQr;�pat�msgZexpected_messagerrr�test_report_error�s		
z"SearchEngineTest.test_report_errorN)	rrrr@rKrLrMrSrWrrrrr?hsr?c@s.eZdZedd��Zdd�ZdS)�
SearchTestcCsqt�|_d}|jjd|�tjd�|_tjd�|_dd�|j_	dd�|j_
dS)Nz&First line
Line with target
Last line
z1.0�targetcWs
d|fS)N�fr)rrrr�<lambda>�sz'SearchTest.setUpClass.<locals>.<lambda>cWs
d|fS)N�br)rrrrr[�s)r+r-r(r7r8rUr	rr�search_forward�search_backward)�cls�	test_textrrr�
setUpClass�szSearchTest.setUpClassc	Cs|j}|j}|j}|j}|j}|jjd�|||�d�dd�}||_||||�d||ddddff�|jjd�||||�d||ddddff�|jjd�|j	jd�||||�d||ddddff�|j	jd�d	d
�}||_||||�d||ddddff�||||d�d||dd
ddff�|j	jd�||||�d||dd
ddff�||||d�d||ddddff�dS)NcSs|dkrdSt�dS)Nr(z1.5)r)r%rrrr)�sz$SearchTest.test_search.<locals>.markrZrr4TFr\cSs*|dkrdS|dkr dSt�dS)Nz	sel.firstz2.10zsel.lastz2.16)r)r%rrrr&�s
z#SearchTest.test_search.<locals>.sel���
)
r rZsearch_textr-rUZpatvarrFr,rIrJ)rr;r�searchr-rUr)r&rrr�test_search�s.						...	.1.zSearchTest.test_searchN)rrr�classmethodrarfrrrrrX�srXc@sFeZdZedd��Zdd�Zdd�Zdd�Zd	S)
�ForwardBackwardTestcCs�tjd�|_t�|_dd�|j_d}|jjd|�tjd�|_	d|_
tjd	�|_tjd
�|_dS)
NcSsdS)Nz4.0r)r,rrrr[sz0ForwardBackwardTest.setUpClass.<locals>.<lambda>z&First line
Line with target
Last line
z1.0rYrbrdrcZxyzz\w*�rdrc)rbri)
r	rrr+r-r,r(r7r8rU�res�failpat�emptypat)r_r`rrrras	zForwardBackwardTest.setUpClasscsd��fdd�}|S)Nrcs@��j|||||�}|r<|d|dj�fS|S)Nrr)r-r:)rUr<�colZwrap�okrj)�funcrrrre sz/ForwardBackwardTest.make_search.<locals>.searchr)rrorer)rorr�make_searchszForwardBackwardTest.make_searchcCs
|j}|j|jj�}|j}|||ddd�|j�|||ddd�|j�|||ddd�d�|||ddd�|j�|||jddd�d�|||jdddd	d�d�|||jddd�|j�dS)NrrT�Frbrd�	rn�rrrr)rbrs)r rprr]rUrjrkrl)rr;ZforwardrUrrr�test_search_forward&s		%z'ForwardBackwardTest.test_search_forwardcCs|j}|j|jj�}|j}|||ddd�|j�|||ddd�|j�|||ddd�d�|||ddd�|j�|||jddd�d�|||jdd	dd
d�d�|||jddd�d�dS)Nrqr4TrbrFrcrrrdrn�rrrr)rbru�r4rr)rbrv)r rprr^rUrjrkrl)rr;ZbackwardrUrrr�test_search_backward7s		%z(ForwardBackwardTest.test_search_backwardN)rrrrgrarprtrwrrrrrhsrh�__main__�	verbosityrb�exit)�__doc__r7ZunittestZtkinterrrrZtkinter.messageboxZ
messageboxr
Zidlelibrr	Zidlelib.idle_test.mock_tkrrrr+r
rrZTestCaserrr#r/r?rXrhr�mainrrrr�<module>s&	#
`=C


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.33 AM
root / linksafe
0755
__init__.cpython-34.pyc
0.502 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
__init__.cpython-34.pyo
0.502 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
htest.cpython-34.pyc
11.496 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
htest.cpython-34.pyo
11.496 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock_idle.cpython-34.pyc
2.399 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock_idle.cpython-34.pyo
2.399 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock_tk.cpython-34.pyc
10.845 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock_tk.cpython-34.pyo
10.845 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_autocomplete.cpython-34.pyc
5.045 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_autocomplete.cpython-34.pyo
5.045 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_autoexpand.cpython-34.pyc
4.139 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_autoexpand.cpython-34.pyo
4.139 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_calltips.cpython-34.pyc
10.097 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_calltips.cpython-34.pyo
10.019 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_config_name.cpython-34.pyc
3.163 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_config_name.cpython-34.pyo
3.163 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_configdialog.cpython-34.pyc
1.341 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_configdialog.cpython-34.pyo
1.341 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_delegator.cpython-34.pyc
1.137 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_delegator.cpython-34.pyo
1.137 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_editor.cpython-34.pyc
1.191 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_editor.cpython-34.pyo
1.191 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_formatparagraph.cpython-34.pyc
12.415 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_formatparagraph.cpython-34.pyo
12.415 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_grep.cpython-34.pyc
3.077 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_grep.cpython-34.pyo
3.077 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_hyperparser.cpython-34.pyc
7.972 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_hyperparser.cpython-34.pyo
7.972 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_idlehistory.cpython-34.pyc
6.697 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_idlehistory.cpython-34.pyo
6.697 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_io.cpython-34.pyc
8.777 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_io.cpython-34.pyo
8.777 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_parenmatch.cpython-34.pyc
3.908 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_parenmatch.cpython-34.pyo
3.908 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_pathbrowser.cpython-34.pyc
1.312 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_pathbrowser.cpython-34.pyo
1.312 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_rstrip.cpython-34.pyc
1.556 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_rstrip.cpython-34.pyo
1.556 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_searchdialogbase.cpython-34.pyc
5.794 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_searchdialogbase.cpython-34.pyo
5.794 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_searchengine.cpython-34.pyc
10.688 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_searchengine.cpython-34.pyo
10.688 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_text.cpython-34.pyc
6.863 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_text.cpython-34.pyo
6.863 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_textview.cpython-34.pyc
3.826 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_textview.cpython-34.pyo
3.826 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_warning.cpython-34.pyc
3.44 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_warning.cpython-34.pyo
3.44 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_widgetredir.cpython-34.pyc
5.447 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
test_widgetredir.cpython-34.pyo
5.447 KB
17 Apr 2024 5.10 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF