3 *ja @sdZddlmZddlZddlmZddlZddlj Z ddl m Z dddhZ d hZ e e BZGd d d ejZGd d d ejZGdddejZedkrejdddS)z%Test macosx, coverage 45% on Windows.)macosxN)requires)FileListcarboncocoaxquartzotherc@s0eZdZdZeddZeddZddZdS) InitTktypeTestzTest _init_tk_type.cCs(tdtj|_|jjtj|_dS)Ngui)rtkTkrootwithdrawrplatform orig_platform)clsrB/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_macosx.py setUpClasss  zInitTktypeTest.setUpClasscCs$|jj|jj|`|jt_dS)N)r update_idletasksdestroyrrr)rrrr tearDownClasss  zInitTktypeTest.tearDownClassc Cs`xZdtfdtffD]F\}}|j|d,|t_tjdktj|jtj|WdQRXqWdS)z.cmd)rr r r rZ createcommand)rr)r2rrIs    zSetupTest.setUpClasscCs|jj|jj|`dS)N)r rr)rrrrrSs  zSetupTest.tearDownClasszidlelib.macosx.overrideRootMenuc Csf|j}t|}xRtD]J}|j|d4|t_tj|||dkrL|j|j|j WdQRXqWdS)z/Call setupApp with each possible graphics type.)r-rrN)rr) r rrrrrZsetupAppr(r)r*)rZoverrideRootMenur Zflistr-rrr test_setupappYs   zSetupTest.test_setupappN) r r!r"r#r$rrr/r0r3rrrrr1Fs r1__main__) verbosity)r#ZidlelibrZunittestZ test.supportrZtkinterr Z unittest.mockr/Zidlelib.filelistrZmactypesrrZTestCaser r%r1r mainrrrrs     !