관리-도구
편집 파일: test_macosx.cpython-37.opt-2.pyc
B YI~d� � @ s� d dl mZ d dlZd dlmZ d dlZd dlmZ d dl m Z dddhZdhZeeB Z G d d � d ej�ZG dd� dej�ZG d d� dej�Zedkr�ejdd� dS )� )�macosxN)�requires)�FileList�carbon�cocoa�xquartz�otherc @ s, e Zd Zedd� �Zedd� �Zdd� ZdS )�InitTktypeTestc C s( t d� t�� | _| j�� tj| _d S )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� setUpClass s zInitTktypeTest.setUpClassc C s$ | j �� | j �� | ` | jt_d S )N)r �update_idletasks�destroyr r r )r r r r � tearDownClass s zInitTktypeTest.tearDownClassc C s` xZdt fdtffD ]F\}}| j|d��, |t_tjd k t�� | �tj|� W d Q R X qW d S )N�darwinr )r )�alltypes�nontypes�subTestr r �_tk_typeZ _init_tk_typeZassertIn)�selfr �typesr r r �test_init_sets_tktype s z$InitTktypeTest.test_init_sets_tktypeN)�__name__� __module__�__qualname__�classmethodr r r r r r r r s r c @ sJ e Zd ZejdfejdfejdfejdffZe � d�dd� �Zdd � Zd S )�IsTypeTkTest)r r r r r zidlelib.macosx._init_tk_typec C sP d t _xD| jD ]:\}}| j|d�� |� | �|j� |�� W d Q R X qW d S )N)�func)r r �isfuncsr � assertTrue�called� reset_mock)r Zmockinitr% �whentruer r r �test_is_calls_init2 s zIsTypeTkTest.test_is_calls_initc C sb x\| j D ]R\}}xHtD ]@}| j|||d��& |t_||kr@| jn| j|� � W d Q R X qW qW d S )N)r% r* �tktype)r&