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

YI~d
@s|ddlmZddlmZedddlZddlmZddlmZm	Z	GdddZ
Gd	d
d
ejZe
dkrxejdd
dS))
ParenMatch)requiresZguiN)Mock)TkTextc@seZdZddZdS)DummyEditwincCs||_d|_d|_d|_dS)Nz>>>)textZindentwidthZtabwidthZprompt_last_line)selfr	rF/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_parenmatch.py__init__szDummyEditwin.__init__N)__name__
__module____qualname__r
rrrrrsrc@sLeZdZeddZeddZddZddZd	d
ZddZ	d
dZ
dS)ParenMatchTestcCs8t|_|jt|j|_t|j|_t|j_dS)N)	rrootZwithdrawrr	reditwinrZ
text_frame)clsrrr
setUpClasss

zParenMatchTest.setUpClasscCs$|`|`|j|j|`dS)N)r	rrZupdate_idletasksZdestroy)rrrr
tearDownClass!s

zParenMatchTest.tearDownClasscCs|jdddS)Nz1.0end)r	delete)r
rrrtearDown(szParenMatchTest.tearDowncCst|j}dd|_|S)NcSsdS)Nrrrrr<lambda>-z/ParenMatchTest.get_parenmatch.<locals>.<lambda>)rrZbell)r
pmrrrget_parenmatch+s

zParenMatchTest.get_parenmatchc
Cs|j}|}xdD]\}}}|j|d|dd||_|dd|d|d||d	kr|	|
d
dd|	|d
d||dd||
d|||d
dd
|d|	|d
d|WdQRXqWdS)N))opener)z1.10z1.11)z1.10z1.11)default)z1.10z1.11)z1.10z1.11)parens)z1.14z1.15)z1.15z1.16)Z
expression)z1.10z1.15)z1.10z1.16)stylez1.0rinsertzdef foobar(a, beventz<<parenmatch-check-restore>>r Zparen)z1.10z1.11)r)r	rZsubTestrZSTYLEr"flash_paren_eventZassertInZ
event_infoZassertTupleEqualZ
tag_nextrangeZ
tag_prevrange
restore_eventZassertNotInZassertEqualparen_closed_event)r
r	rr!Zrange1Zrange2rrrtest_paren_styles0s.


z ParenMatchTest.test_paren_stylescCs^|j}|}|dd|d|dd|d|d|dd|ddS)Nr"z# this is a commen)r#z
defz	 a, *arg))r	rr"r'r%)r
r	rrrrtest_paren_cornerRs


z ParenMatchTest.test_paren_cornercCsN|}t|_|d||jj|j|d||jjdS)Nr)rrr&Zhandle_restore_timerZ
assertTrueZcalledZ
reset_mockZassertFalse)r
rrrrtest_handle_restore_timeres


z(ParenMatchTest.test_handle_restore_timerN)rrrclassmethodrrrrr(r)r+rrrrrs"r__main__)	verbosity)Zidlelib.parenmatchrZtest.supportrZunittestZ
unittest.mockrZtkinterrrrZTestCaserrmainrrrr<module>sX