• File: test_autoexpand.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/idlelib/idle_test/__pycache__/test_autoexpand.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 3.82 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Nj@sldZddlmZddlZddlmZddlmZmZGdddZ	Gdd	d	ej
Zed
krhej
dddS)
zTest autoexpand, coverage 100%.)
AutoExpandN)requires)TextTkc@seZdZddZdS)DummyEditwincCs
||_dS)N)text)selfrr	F/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_autoexpand.py__init__szDummyEditwin.__init__N)__name__
__module____qualname__rr	r	r	r
r	src@sTeZdZeddZeddZddZddZd	d
ZddZ	d
dZ
ddZdS)AutoExpandTestcCs<tdt|_t|j|_tt|j|_dd|j_dS)NZguicSsdS)Nr	r	r	r	r
<lambda>z+AutoExpandTest.setUpClass.<locals>.<lambda>)	rrtkrrrrauto_expandZbell)clsr	r	r

setUpClasss
zAutoExpandTest.setUpClasscCs$|`|`t|dr |j|`dS)Nr)rrhasattrrZdestroy)rr	r	r

tearDownClass's

zAutoExpandTest.tearDownClasscCs|jdddS)Nz1.0end)rdelete)rr	r	r
tearDown.szAutoExpandTest.tearDowncCs|j}|jj}|j}||d|dd||d|dd||d|dd||d|dd||d|dd||d	|d
d||d|dd||ddS)
NinserttZhisthis isz
sample
stringstringz3.0z1.0r)rrgetprevwordassertEqualrr)rrpreviousequalr	r	r
test_get_prevword1s$z AutoExpandTest.test_get_prevwordcCs|jj}|jj}|j}|jdd||jddddg|d||d|d||d|d||d|d||ddS)Nrzab ac bx ad ab aabadacaevent)rr"expand_word_eventr#rrgetwords)rr$expandr%r	r	r
test_before_onlyMszAutoExpandTest.test_before_onlycCs|j}|jj}|jj}|j}|dd|dd||jddddg|d||d|d||d|d||d|d||ddS)	Nrz a, [ab] ac: () bx"" cd ac= ad yaz1.1r'r)r(r*r+)rrr"r,r#rmark_setr-)rrr$r.r%r	r	r
test_after_only]szAutoExpandTest.test_after_onlycCs|j}|jj}|jj}|j}|dd|dd|dd||jdddg|d||d|d||d|d||ddS)	Nrz	ab xy yz
z
a ac by acz2.1r'r)r*r+)rrr"r,r#rr0r-)rrr$r.r%r	r	r
test_both_before_afterpsz%AutoExpandTest.test_both_before_aftercCs|j}|jj}|j}||jg||dd|dd||jg|dd|dd|d|jj}|dd|d|jj}|||dS)Nr+breakrz
bx cy dz azac xy a ac ad az1.7z1.end)	rrr,r#r-rr0stateZassertNotEqual)rrr.r%Z
initial_stateZ	new_stater	r	r
test_other_expand_casessz&AutoExpandTest.test_other_expand_casesN)rr
rclassmethodrrrr&r/r1r2r5r	r	r	r
rsr__main__)	verbosity)__doc__Zidlelib.autoexpandrZunittestZtest.supportrZtkinterrrrZTestCaserrmainr	r	r	r
<module>s