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     !