B xc @sdZddlmZddlZddlmZddlZddlm 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(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)z.cmd)rr r r rZ createcommand)rr)r2rrIs    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)z/Call setupApp with each possible graphics type.)r-)rrN) 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     !