Your IP : 216.73.216.213
3
� f+4 � @ s� d dl Z d dlZd dlmZ d dlmZmZ ejd� G dd� dee j�Z G dd� dee j�Z
G d d
� d
ee j�Ze e
efZe
dkr�eje� dS )� N)�support)�AbstractTkTest�requires_tclZguic @ s e Zd Zdd� Zdd� ZdS )�MiscTestc C s2 | j j� }| j|t� | jd|� | jd|� d S )N�photo�bitmap)�root�image_types�assertIsInstance�tuple�assertIn)�selfr � r �J/opt/alt/python36/lib64/python3.6/tkinter/test/test_tkinter/test_images.py�test_image_types s
zMiscTest.test_image_typesc C s | j j� }| j|t� d S )N)r �image_namesr
r )r
r r r r �test_image_names s
zMiscTest.test_image_namesN)�__name__�
__module__�__qualname__r r r r r r r s r c @ sP e Zd Zedd� �Zdd� Zdd� Zdd� Zd d
� Zdd� Z d
d� Z
dd� ZdS )�BitmapImageTestc C s t jj| � tjddd�| _d S )Nz
python.xbm�
imghdrdata)�subdir)r �
setUpClass�__func__r �findfile�testfile)�clsr r r r s zBitmapImageTest.setUpClassc C s� t jd| jdd| jd�}| jt|�d� | j|j� d� | j|j� d� | j|j� d� | j d| jj
� � ~| jd| jj
� � d S )Nz::img::test�yellow�blue)�master�
foreground�
background�filer � )�tkinter�BitmapImager r �assertEqual�str�type�width�heightr r �assertNotIn)r
�imager r r �test_create_from_file s
z%BitmapImageTest.test_create_from_filec C s� t | jd��}|j� }W d Q R X tjd| jdd|d�}| jt|�d� | j|j� d� | j|j � d� | j|j
� d� | jd| jj� � ~| j
d| jj� � d S )N�rbz::img::testr r )r r! r"