ó
ŠwÛjc           @  sÜ   d  d l  m Z d  d l Z d  d l m Z d  d l Z d  d l Z y e j d d e	 ƒZ
 Wn e j k
 rs n Xd e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e j f d „  ƒ  YZ d „  Z e d k rØ e ƒ  n  d S(   iÿÿÿÿ(   t   print_functionN(   t   test_supportt   bsddbt
   deprecatedt   NoAllc           B  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyR      s   t   FailedImportc           B  s   e  Z RS(    (   R   R   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyR      s   t   AllTestc           B  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         B  s  i  } e  j d e f d e ƒ�+ y d | | UWn e | ƒ ‚ n XWd  QXe e j | d ƒ ss e | ƒ ‚ n  i  } y d | | UWn5 e	 k
 rÀ } |  j
 d j | | j j | ƒ ƒ n Xd | k r× | d =n  e | ƒ } e e j | j ƒ } |  j | | ƒ d  S(   Ns   .* (module|package)t   quiets	   import %st   __all__s   from %s import *s   __all__ failure in {}: {}: {}t   __builtins__(   t   supportt   check_warningst   DeprecationWarningt   TrueR   t   hasattrt   syst   modulesR   t	   Exceptiont   failt   formatt	   __class__R   t   setR
   t   assertEqual(   t   selft   modnamet   namest   et   keyst   all(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyt	   check_all   s(    	
c         c  sõ   xî t  t j | ƒ ƒ D]× } t j j | | ƒ } t j j | ƒ r¸ t j j | d ƒ } t j j | ƒ r | | | f Vx6 |  j | | | d ƒ D] \ } } | | f Vq” Wq q n  | j d ƒ s | d k rÚ q n  | | | d  f Vq Wd  S(   Ns   __init__.pyt   .s   .pyiýÿÿÿ(	   t   sortedt   ost   listdirt   patht   joint   isdirt   existst   walk_modulest   endswith(   R   t   basedirt   modpatht   fnR$   t   pkg_initt   pt   m(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyR(   2   s    'c         C  sð  t  d g ƒ } t j j d ƒ s0 d d  l } n  d d  l } | j | j ƒ } z( y d d  l } Wn t	 k
 rt n XWd  | j
 | j | ƒ Xg  } g  } t j j t j j t ƒ ƒ } x|  j | d ƒ D]ø \ }	 }
 |
 } t } x3 | r| | k rt } Pn  | j d ƒ d } qå W| r$qÊ n  t j r:t |
 ƒ n  yJ t |	 d ƒ �5 } d | j ƒ  k rpt |
 ƒ ‚ n  |  j |
 ƒ Wd  QXWqÊ t k
 r¤| j |
 ƒ qÊ t k
 rÁ| j |
 ƒ qÊ XqÊ Wt j rìt d	 | ƒ t d
 | ƒ n  d  S(   Nt
   __future__t   javaiÿÿÿÿt    R    i    t   rbR
   s8   Following modules have no __all__ and have been ignored:s(   Following modules failed to be imported:(   R   R   t   platformt
   startswitht   _sockett   localet	   getlocalet   LC_CTYPEt   rlcompletert   ImportErrort	   setlocaleR"   R$   t   dirnamet   __file__R(   t   FalseR   t
   rpartitionR   t   verboset   printt   opent   readR   R   t   appendR   (   R   t	   blacklistR6   R7   t   locale_tupleR:   t   ignoredt   failed_importst   lib_dirR$   R   R/   t   blacklistedt   f(    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyt   test_all@   sP     			(   R   R   R   R(   RM   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyR      s   		c           C  s   t  j t ƒ d  S(   N(   R   t   run_unittestR   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyt	   test_mainx   s    t   __main__(   R0   R    t   unittestt   testR   R   R"   R   t   import_moduleR   R   t   SkipTestt   RuntimeErrorR   R   t   TestCaseR   RO   R   (    (    (    s‡   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test___all__.pyt   <module>   s   b	