???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
zfc           @   s³   d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z e j j e j j	 e
 ƒ ƒ Z d „  Z e e d d „ Z e e d d „ Z e d k r¯ e j j e ƒ  Œ  n  d S(   sß   
Use this module to get and run all tk tests.

Tkinter tests should live in a package inside the directory where this file
lives, like test_tkinter.
Extensions also should live in packages following the same rule as above.
iÿÿÿÿNc         C   s.   x' t  j |  ƒ D] } | d k r t Sq Wt S(   Ns   __init__.pys   __init__.pycs
   __init.pyo(   s   __init__.pys   __init__.pycs
   __init.pyo(   t   ost   listdirt   Truet   False(   t   patht   name(    (    s.   /usr/lib64/python2.7/lib-tk/test/runtktests.pyt
   is_package   s    c   	      #   s-  d ‰  x t  j |  ƒ D]\ } } } x4 t | ƒ D]& } | d d k r2 | j | ƒ q2 q2 Wt | ƒ r | r | t |  ƒ t t  j ƒ j d d ƒ } | r¯ | | k r¯ q n  t ‡  f d †  | ƒ } x[ | D]P } y$ t	 j
 d | t ˆ  ƒ  | ƒ VWqÎ t j j k
 r| r‚  qqÎ XqÎ Wq q Wd S(   së   This will import and yield modules whose names start with test_
    and are inside packages found in the path starting at basepath.

    If packages is specified it should contain package names that want
    their tests collected.
    s   .pyi    t   .t   /c            s   |  j  d ƒ o |  j ˆ  ƒ S(   Nt   test_(   t
   startswitht   endswith(   t   x(   t   py_ext(    s.   /usr/lib64/python2.7/lib-tk/test/runtktests.pyt   <lambda>+   t    s   .%sN(   R    t   walkt   listt   removeR   t   lent   sept   replacet   filtert	   importlibt   import_modulet   testt   test_supportt   ResourceDenied(	   t   basepatht   guit   packagest   dirpatht   dirnamest	   filenamest   dirnamet   pkg_nameR   (    (   R   s.   /usr/lib64/python2.7/lib-tk/test/runtktests.pyt   get_tests_modules   s&    )	c         c   s‰   g  } |  r | j  d ƒ n  | r2 | j  d ƒ n  xP t d | d | ƒ D]9 } x0 | D]( } x t | | d ƒ D] } | Vqn WqU WqH Wd S(   s   Yield all the tests in the modules found by get_tests_modules.

    If nogui is True, only tests that do not require a GUI will be
    returned.t   tests_noguit	   tests_guiR   R   N(    (   t   appendR$   t   getattr(   t   textR   R   t   attrst   modulet   attrR   (    (    s.   /usr/lib64/python2.7/lib-tk/test/runtktests.pyt	   get_tests6   s    t   __main__(   t   __doc__R    t   syst   unittestR   t   test.test_supportR   R   t   abspathR"   t   __file__t   this_dir_pathR   R   t   NoneR$   R-   t   __name__R   t   run_unittest(    (    (    s.   /usr/lib64/python2.7/lib-tk/test/runtktests.pyt   <module>   s   	