B „ fí ã@sªdZddlmZddlZddlmZddlZddlm Z ddl m Z dddhZ d hZ e e BZGd d „d ejƒZGd d „d ejƒZGdd„dejƒZedkr¦ejdd�dS)z%Test macosx, coverage 45% on Windows.é)ÚmacosxN)Úrequires)ÚFileListÚcarbonÚcocoaÚxquartzÚotherc@s0eZdZdZedd„ƒZedd„ƒZdd„ZdS) ÚInitTktypeTestzTest _init_tk_type.cCs(tdƒt ¡|_|j ¡tj|_dS)NÚgui)rÚtkÚTkÚrootÚwithdrawrÚplatformÚ orig_platform)Úcls©rúB/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_macosx.pyÚ setUpClasss  zInitTktypeTest.setUpClasscCs$|j ¡|j ¡|`|jt_dS)N)r Úupdate_idletasksÚdestroyrrr)rrrrÚ tearDownClasss  zInitTktypeTest.tearDownClassc Cs`xZdtfdtffD]F\}}|j|d��,|t_tjdkt ¡| tj|¡WdQRXqWdS)z.cmd)rr r r rZ createcommand)rr)r6rrIs    zSetupTest.setUpClasscCs|j ¡|j ¡|`dS)N)r rr)rrrrrSs  zSetupTest.tearDownClasszidlelib.macosx.overrideRootMenuc Csf|j}t|ƒ}xRtD]J}|j|d��4|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/r0r7rrrrr1Fs r1Ú__main__é)Ú verbosity)r#ZidlelibrZunittestZ test.supportrZtkinterr Z unittest.mockr/Zidlelib.filelistrZmactypesrrZTestCaser r%r1r ÚmainrrrrÚs     !