ó
wŰjc           @   sg   d  d l  m Z d  d l Z e j d  Z d e j f d     YZ d   Z e d k rc e   n  d S(   i˙˙˙˙(   t   test_supportNt   dbmt   DbmTestCasec           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s5   t  j |  _ t j |  j d  |  _ |  j j   d  S(   Nt   c(   R    t   TESTFNt   filenameR   t   opent   dt   close(   t   self(    (    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_dbm.pyt   setUp   s    c         C   s5   x. d d d d g D] } t  j |  j |  q Wd  S(   Nt    s   .pags   .dirs   .db(   R    t   unlinkR   (   R	   t   suffix(    (    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_dbm.pyt   tearDown   s    c            s  t  j   j d    _   j   j j   g   d	 d
 g } x! | D] \ } } |   j | <qD W  j t   j j    t d   | D   x> | D]6 \ } }   j |   j    j   j | |  q W  j d   j    j	 t
   f d      j j   d  S(   NR   t   at   bt   12345678910t   019237410982340912840198242c         s   s   |  ] \ } } | Vq d  S(   N(    (   t   .0t   kt   v(    (    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_dbm.pys	   <genexpr>   s    t   xxxc              s     j  d S(   NR   (   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_dbm.pyt   <lambda>   R   (   R   R   (   R   R   (   R   R   R   R   t   assertEqualt   keyst   sortedt   assertInt   assertNotInt   assertRaisest   KeyErrorR   (   R	   R   R   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_dbm.pyt	   test_keys   s    /c         C   sk   xd d d d d g D]P } y) t  j |  j |  |  _ |  j j   Wq t  j k
 rb |  j   q Xq Wd  S(   Nt   rt   rwt   wt   n(   R   R   R   R   R   t   errort   fail(   R	   t   mode(    (    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_dbm.pyt
   test_modes   s    (   t   __name__t
   __module__R
   R   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_dbm.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_dbm.pyt	   test_main&   s    t   __main__(	   t   testR    t   unittestt   import_moduleR   t   TestCaseR   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_dbm.pyt   <module>   s   !	