ó
wŰjc           @   s   d  Z  d d l Z d d l Z d d l Z d d l m Z e j Z e j d d e	 Z
 d   Z d e j f d     YZ d	   Z e d
 k r e   n  d S(   s=   Test script for the anydbm module
   based on testdumbdbm.py
i˙˙˙˙N(   t   test_supportt   anydbmt
   deprecatedc          C   sG   x@ t  j  t d  D]+ }  y t j |   Wq t k
 r> q Xq Wd  S(   Nt   *(   t   globt   _fnamet   ost   unlinkt   OSError(   t   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_anydbm.pyt   _delete_files   s
    t   AnyDBMTestCasec           B   s   e  Z i d  d 6d d 6d d 6d d 6d d	 6d
 d 6d d 6Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z RS(   t    t   0s   Python:t   at   Programmingt   bt   thet   ct   wayt   dt   GuidoR	   t   intendedt   gc         G   s   t  j j |  |  d  S(   N(   t   unittestt   TestCaset   __init__(   t   selft   args(    (    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_anydbm.pyR   "   s    c         C   sh   t  j t d  } |  j | j   g   x" |  j D] } |  j | | | <q2 W|  j |  | j   d  S(   NR   (   R   t   openR   t   assertEqualt   keyst   _dictt   read_helpert   close(   R   R	   t   key(    (    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_anydbm.pyt   test_anydbm_creation%   s    c         C   sL   |  j    t j t d  } d |  j d <| d <|  j |  | j   d  S(   NR   t   indentedR   (   t   init_dbR   R   R   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_anydbm.pyt   test_anydbm_modification-   s
    
c         C   s7   |  j    t j t d  } |  j |  | j   d  S(   Nt   r(   R&   R   R   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_anydbm.pyt   test_anydbm_read4   s    
c         C   s9   |  j    t j t d  } |  j |  } | j   d  S(   NR(   (   R&   R   R   R   t   keys_helperR"   (   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_anydbm.pyt   test_anydbm_keys:   s    
c         C   sB   |  j  |  } x, |  j D]! } |  j |  j | | |  q Wd  S(   N(   R*   R    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_anydbm.pyR!   @   s    c         C   sE   t  j t d  } x" |  j D] } |  j | | | <q W| j   d  S(   Nt   n(   R   R   R   R    R"   (   R   R	   t   k(    (    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_anydbm.pyR&   E   s    c         C   sC   | j    } | j   |  j j    } | j   |  j | |  | S(   N(   R   t   sortR    R   (   R   R	   R   t   dkeys(    (    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_anydbm.pyR*   K   s    

c         C   s   t    d  S(   N(   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_anydbm.pyt   tearDownS   s    c         C   s   t    d  S(   N(   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_anydbm.pyt   setUpV   s    (   t   __name__t
   __module__R    R   R$   R'   R)   R+   R!   R&   R*   R0   R1   (    (    (    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_anydbm.pyR      s"   

									c           C   s    z t  j t  Wd  t   Xd  S(   N(   R    t   run_unittestR   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_anydbm.pyt	   test_mainY   s    t   __main__(   t   __doc__R   R   R   t   testR    t   TESTFNR   t   import_modulet   TrueR   R
   R   R   R5   R2   (    (    (    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_anydbm.pyt   <module>   s   			A	