• File: test_macosx.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_macosx.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@sddlmZddlZddlmZddlZddlmZddl	m
Z
dddhZdhZeeBZ
Gd	d
d
ejZGdddejZGd
ddejZedkrejdddS))macosxN)requires)FileListcarboncocoaxquartzotherc@s,eZdZeddZeddZddZdS)InitTktypeTestcCs(tdt|_|jtj|_dS)Ngui)rtkTkrootwithdrawrplatform
orig_platform)clsrB/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_macosx.py
setUpClasss

zInitTktypeTest.setUpClasscCs$|j|j|`|jt_dS)N)r
update_idletasksdestroyrrr)rrrr
tearDownClasss

zInitTktypeTest.tearDownClassc
Cs`xZdtfdtffD]F\}}|j|d,|t_tjdkt|tj|WdQRXqWdS)Ndarwinr)r)alltypesnontypessubTestrr_tk_typeZ
_init_tk_typeZassertIn)selfrtypesrrrtest_init_sets_tktype s
z$InitTktypeTest.test_init_sets_tktypeN)__name__
__module____qualname__classmethodrrrrrrrr	sr	c@sJeZdZejdfejdfejdfejdffZe	
dddZdd	Zd
S)IsTypeTkTest)rrrrrzidlelib.macosx._init_tk_typec
CsPdt_xD|jD]:\}}|j|d |||j|WdQRXqWdS)N)func)rrisfuncsr
assertTruecalled
reset_mock)rZmockinitr%whentruerrrtest_is_calls_init2szIsTypeTkTest.test_is_calls_initcCsbx\|jD]R\}}xHtD]@}|j|||d&|t_||kr@|jn|j|WdQRXqWqWdS)N)r%r*tktype)r&rrrrr'ZassertFalse)rr%r*r,rrrtest_isfuncs<s
zIsTypeTkTest.test_isfuncsN)
r r!r"rZisAquaTkZ
isCarbonTkZ	isCocoaTkZ	isXQuartzr&mockpatchr+r-rrrrr$*s
r$c@s6eZdZeddZeddZedddZdS)		SetupTestcs4tdt|_|jfdd|j_dS)Nr
csdS)Nr)Ztkpathr%)cmdrrr1Nsz!SetupTest.setUpClass.<locals>.cmd)rrrr
rZ
createcommand)rr)r1rrIs


zSetupTest.setUpClasscCs|j|j|`dS)N)r
rr)rrrrrSs

zSetupTest.tearDownClasszidlelib.macosx.overrideRootMenuc
Csf|j}t|}xRtD]J}|j|d4|t_t|||dkrL||j|	WdQRXqWdS)N)r,)rr)
r
rrrrrZsetupAppr'r(r))rZoverrideRootMenur
flistr,rrr
test_setupappYs
zSetupTest.test_setupappN)	r r!r"r#rrr.r/r3rrrrr0Fs
r0__main__)	verbosity)ZidlelibrZunittestZtest.supportrZtkinterrZ
unittest.mockr.Zidlelib.filelistrZmactypesrrZTestCaser	r$r0r mainrrrr<module>s
!