???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
zfc           @   sÙ   d  d l  Z  d  d l Z d  d l Z d  d l j Z d  d l m Z m	 Z	 e j
 d ƒ d e e  j f d „  ƒ  YZ d e e  j f d „  ƒ  YZ d e e  j f d	 „  ƒ  YZ e e e f Z e d
 k rÕ e j e Œ  n  d S(   iÿÿÿÿN(   t   AbstractTkTestt   requires_tclt   guit   MiscTestc           B   s   e  Z d  „  Z d „  Z RS(   c         C   sC   |  j  j ƒ  } |  j | t ƒ |  j d | ƒ |  j d | ƒ d  S(   Nt   photot   bitmap(   t   roott   image_typest   assertIsInstancet   tuplet   assertIn(   t   selfR   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_image_types   s    c         C   s#   |  j  j ƒ  } |  j | t ƒ d  S(   N(   R   t   image_namesR   R	   (   R   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_image_names   s    (   t   __name__t
   __module__R   R   (    (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR   
   s   	t   BitmapImageTestc           B   sV   e  Z e d  „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(   c         C   s,   t  j j |  ƒ t j d d d ƒ|  _ d  S(   Ns
   python.xbmt   subdirt
   imghdrdata(   R    t
   setUpClasst   __func__t   supportt   findfilet   testfile(   t   cls(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR      s    c      
   C   s¾   t  j d d |  j d d d d d |  j ƒ} |  j t | ƒ d ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d	 ƒ |  j | j ƒ  d	 ƒ |  j	 d |  j j
 ƒ  ƒ ~ |  j d |  j j
 ƒ  ƒ d  S(
   Ns   ::img::testt   mastert
   foregroundt   yellowt
   backgroundt   bluet   fileR   i   (   t   tkintert   BitmapImageR   R   t   assertEqualt   strt   typet   widtht   heightR
   R   t   assertNotIn(   R   t   image(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_file   s    c         C   sâ   t  |  j d ƒ  } | j ƒ  } Wd  QXt j d d |  j d d d d d | ƒ} |  j t | ƒ d ƒ |  j | j ƒ  d	 ƒ |  j | j	 ƒ  d
 ƒ |  j | j
 ƒ  d
 ƒ |  j d |  j j ƒ  ƒ ~ |  j d |  j j ƒ  ƒ d  S(   Nt   rbs   ::img::testR   R   R   R   R   t   dataR   i   (   t   openR   t   readR    R!   R   R"   R#   R$   R%   R&   R
   R   R'   (   R   t   fR+   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_data*   s    	c         C   s0   |  j  | t ƒ |  j |  j j | ƒ | ƒ d  S(   N(   R   R#   R"   R   t	   splitlist(   R   t   actualt   expected(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   assertEqualStrList8   s    c         C   sý   t  j d d |  j ƒ} |  j | d d ƒ t |  j d ƒ  } | j ƒ  } Wd  QX| j d | ƒ |  j | d d d d d | f ƒ |  j | j	 ƒ  d ƒ |  j | j
 ƒ  d ƒ |  j | d	 d
 ƒ | j d	 | ƒ |  j | d	 d d d d | f ƒ d  S(   Ns   ::img::testR   R+   s   -data {} {} {} {}R*   s   -datat    i   t   maskdatas   -maskdata {} {} {} {}s	   -maskdata(   R    R!   R   R"   R,   R   R-   t	   configureR3   R%   R&   (   R   R(   R.   R+   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_data<   s    c         C   sâ   t  j d d |  j ƒ} |  j | d d ƒ | j d |  j ƒ |  j | d d d d d |  j f ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | d d	 ƒ | j d |  j ƒ |  j | d d
 d d d |  j f ƒ d  S(   Ns   ::img::testR   R   s   -file {} {} {} {}s   -fileR4   i   t   maskfiles   -maskfile {} {} {} {}s	   -maskfile(	   R    R!   R   R"   R6   R   R3   R%   R&   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_fileL   s    c         C   sT   t  j d d |  j ƒ} |  j | d d ƒ | j d d ƒ |  j | d d ƒ d  S(   Ns   ::img::testR   R   s   -background {} {} {} {}R   s   -background {} {} {} blue(   R    R!   R   R"   R6   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_backgroundZ   s    c         C   sT   t  j d d |  j ƒ} |  j | d d ƒ | j d d ƒ |  j | d d ƒ d  S(   Ns   ::img::testR   R   s!   -foreground {} {} #000000 #000000R   s    -foreground {} {} #000000 yellow(   R    R!   R   R"   R6   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_foreground`   s    (   R   R   t   classmethodR   R)   R/   R3   R7   R9   R:   R;   (    (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR      s   						t   PhotoImageTestc           B   s  e  Z e d  „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z e d d ƒ d „  ƒ Z e d d ƒ d „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s,   t  j j |  ƒ t j d d d ƒ|  _ d  S(   Ns
   python.gifR   R   (   R    R   R   R   R   R   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR   k   s    c         C   s   t  j d d |  j d |  j ƒS(   Ns   ::img::testR   R   (   R    t
   PhotoImageR   R   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   createp   s    c         G   s-   t  j d k r |  j r | St  j | ƒ Sd  S(   Ng333333!@(   R    t	   TkVersiont   wantobjectst   _join(   R   t   args(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt	   colorlistt   s    c         C   sð   t  j d | d d ƒ} t j d d |  j d | ƒ} |  j t | ƒ d ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j	 ƒ  d ƒ |  j | d	 d
 ƒ |  j | d | ƒ |  j
 d |  j j ƒ  ƒ ~ |  j d |  j j ƒ  ƒ d  S(   Ns   python.R   R   s   ::img::testR   R   R   i   R+   R4   (   R   R   R    R>   R   R"   R#   R$   R%   R&   R
   R   R'   (   R   t   extR   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   check_create_from_filez   s    	c         C   s,  t  j d | d d ƒ} t | d ƒ  } | j ƒ  } Wd  QXt j d d |  j d | ƒ} |  j t | ƒ d ƒ |  j | j	 ƒ  d ƒ |  j | j
 ƒ  d	 ƒ |  j | j ƒ  d	 ƒ |  j | d |  j rÏ | n | j d
 ƒ ƒ |  j | d d ƒ |  j d |  j j ƒ  ƒ ~ |  j d |  j j ƒ  ƒ d  S(   Ns   python.R   R   R*   s   ::img::testR   R+   R   i   t   latin1R   R4   (   R   R   R,   R-   R    R>   R   R"   R#   R$   R%   R&   RA   t   decodeR
   R   R'   (   R   RE   R   R.   R+   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   check_create_from_dataˆ   s    	c         C   s   |  j  d ƒ d  S(   Nt   ppm(   RF   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_ppm_file™   s    c         C   s   |  j  d ƒ d  S(   NRJ   (   RI   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_ppm_dataœ   s    c         C   s   |  j  d ƒ d  S(   Nt   pgm(   RF   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_pgm_fileŸ   s    c         C   s   |  j  d ƒ d  S(   NRM   (   RI   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_pgm_data¢   s    c         C   s   |  j  d ƒ d  S(   Nt   gif(   RF   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_gif_file¥   s    c         C   s   |  j  d ƒ d  S(   NRP   (   RI   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_gif_data¨   s    i   i   c         C   s   |  j  d ƒ d  S(   Nt   png(   RF   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_png_file«   s    c         C   s   |  j  d ƒ d  S(   NRS   (   RI   (   R   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_create_from_png_data¯   s    c         C   s¿   t  j d d |  j ƒ} |  j | d d ƒ t |  j d ƒ  } | j ƒ  } Wd  QX| j d | ƒ |  j | d |  j r | n | j	 d ƒ ƒ |  j | j
 ƒ  d ƒ |  j | j ƒ  d ƒ d  S(   Ns   ::img::testR   R+   R4   R*   RG   i   (   R    R>   R   R"   R,   R   R-   R6   RA   RH   R%   R&   (   R   R(   R.   R+   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR7   ³   s    c         C   s˜   t  j d d |  j ƒ} |  j | d d ƒ | j d |  j d d ƒ |  j | d |  j ra d n d ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ d  S(	   Ns   ::img::testR   t   formatR4   R   RP   i   (   RP   (	   R    R>   R   R"   R6   R   RA   R%   R&   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_format¾   s    c         C   s†   t  j d d |  j ƒ} |  j | d d ƒ | j d |  j ƒ |  j | d |  j ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ d  S(   Ns   ::img::testR   R   R4   i   (   R    R>   R   R"   R6   R   R%   R&   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR9   Ç   s    c         C   sT   t  j d d |  j ƒ} |  j | d d ƒ | j d d ƒ |  j | d d ƒ d  S(   Ns   ::img::testR   t   gammas   1.0g       @s   2.0(   R    R>   R   R"   R6   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_gammaÏ   s    c         C   s¸   t  j d d |  j ƒ} |  j | d d ƒ |  j | d d ƒ | j d d ƒ | j d d ƒ |  j | d d ƒ |  j | d d	 ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ d  S(
   Ns   ::img::testR   R%   t   0R&   i   i
   t   20t   10(   R    R>   R   R"   R6   R%   R&   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_width_heightÕ   s    c         C   sx   t  j d d |  j ƒ} |  j | d d ƒ | j d d ƒ |  j | d d ƒ | j d d ƒ |  j | d d ƒ d  S(   Ns   ::img::testR   t   paletteR4   i   t   256s   3/4/2(   R    R>   R   R"   R6   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_configure_paletteà   s    c         C   sq   |  j  ƒ  } | j ƒ  |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ |  j d d d ƒ ƒ d  S(   Ni   i   i   i    (   R?   t   blankR"   R%   R&   t   getRD   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt
   test_blankè   s
    
c         C   sp   |  j  ƒ  } | j ƒ  } |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ | j d d ƒ ƒ d  S(   Ni   i   i   (   R?   t   copyR"   R%   R&   Rb   (   R   R(   t   image2(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt	   test_copyï   s
    c         C   sÙ   |  j  ƒ  } | j d d ƒ } |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ | j d d ƒ ƒ | j d ƒ } |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ | j d d ƒ ƒ d  S(   Ni   i   i   i   i   (   R?   t	   subsampleR"   R%   R&   Rb   (   R   R(   Re   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_subsampleö   s    (c         C   s)  |  j  ƒ  } | j d d ƒ } |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ | j d d ƒ ƒ |  j | j d	 d
 ƒ | j d d ƒ ƒ | j d ƒ } |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j | j d d ƒ | j d d ƒ ƒ |  j | j d	 d ƒ | j d d ƒ ƒ d  S(   Ni   i   i    i0   i   i   i   i   i	   i   i   i   (   R?   t   zoomR"   R%   R&   Rb   (   R   R(   Re   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt	   test_zoom  s    (((c         C   s£  |  j  ƒ  } | j d d d ƒ|  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d t j d k r} d	 n d d ƒ ƒ |  j | j d d
 ƒ |  j d d d ƒ ƒ |  j | j d d
 ƒ |  j d d d ƒ ƒ | j d d f ƒ |  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d d d ƒ ƒ d  S(   Ns   {red green} {blue yellow}t   toi   i   iÿ   i    i   g333333!@i€   i   s   #f00s   #00ff00s
   #000000fffs   #ffffffff0000i   (   i   i   (   s   #f00s   #00ff00(   s
   #000000fffs   #ffffffff0000(   R?   t   putR"   Rb   RD   R    R@   (   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_put  s    ++++++c         C   s  |  j  ƒ  } |  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d d d ƒ ƒ |  j | j d d ƒ |  j d d d ƒ ƒ |  j t j | j d d ƒ |  j t j | j d d ƒ |  j t j | j d	 d ƒ |  j t j | j d d	 ƒ d  S(
   Ni   i   i>   it   i¢   i    i   iÿÿÿÿi   (   R?   R"   Rb   RD   t   assertRaisesR    t   TclError(   R   R(   (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   test_get   s    +++c      	   C   sð  |  j  ƒ  } |  j t j t j ƒ | j t j ƒ t j d d |  j d d d t j ƒ} |  j	 t
 | ƒ d ƒ |  j	 | j ƒ  d ƒ |  j	 | j ƒ  d ƒ |  j	 | j ƒ  d ƒ |  j	 | j d d ƒ | j d d ƒ ƒ |  j	 | j d	 d
 ƒ | j d	 d
 ƒ ƒ | j t j d d d d ƒt j d d |  j d d d t j ƒ} |  j	 t
 | ƒ d ƒ |  j	 | j ƒ  d ƒ |  j	 | j ƒ  d ƒ |  j	 | j ƒ  d ƒ |  j	 | j d d ƒ | j d d ƒ ƒ |  j	 | j d d ƒ | j d d
 ƒ ƒ d  S(   Ns   ::img::test2R   RV   RJ   R   R   i   i    i   i   RP   t   from_coordsi   i   i	   s   ::img::test3i   i   i   i   (   i   i   i   i	   (   R?   t
   addCleanupR   t   unlinkt   TESTFNt   writeR    R>   R   R"   R#   R$   R%   R&   Rb   (   R   R(   Re   t   image3(    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt
   test_write*  s,    ((((   R   R   R<   R   R?   RD   RF   RI   RK   RL   RN   RO   RQ   RR   R   RT   RU   R7   RW   R9   RY   R]   R`   Rc   Rf   Rh   Rj   Rm   Rp   Rw   (    (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyR=   i   s4   																							
t   __main__(   t   unittestt   TkinterR    t   ttkt   test.test_supportt   test_supportR   t   test_ttk.supportR    R   t   requirest   TestCaseR   R   R=   t	   tests_guiR   t   run_unittest(    (    (    s<   /usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyt   <module>   s   RÜ