
"Ic           @   s   d  Z  d d k Z d d k Z d d k Z d d k Z d d k l Z e i Z d   Z	 d e i
 f d     YZ d   Z e d j o e   n d S(	   s=   Test script for the anydbm module
   based on testdumbdbm.py
iN(   t   test_supportc          C   sI   xB t  i  t d  D]- }  y t i |   Wq t j
 o q Xq Wd  S(   Nt   *(   t   globt   _fnamet   ost   unlinkt   OSError(   t   f(    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   _delete_files   s     t   AnyDBMTestCasec           B   s   e  Z h 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  i i |  |  d  S(   N(   t   unittestt   TestCaset   __init__(   t   selft   args(    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyR   !   s    c         C   sh   t  i t d  } |  i | i   g   x" |  i D] } |  i | | | <q2 W|  i |  | i   d  S(   NR   (   t   anydbmt   openR   t   assertEqualt   keyst   _dictt   read_helpert   close(   R   R   t   key(    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   test_anydbm_creation$   s    
 c         C   sL   |  i    t i t d  } d |  i d <| d <|  i |  | i   d  S(   NR   t   indentedR   (   t   init_dbR   R   R   R   R    R!   (   R   R   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   test_anydbm_modification,   s
    
c         C   s7   |  i    t i t d  } |  i |  | i   d  S(   Nt   r(   R%   R   R   R   R    R!   (   R   R   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   test_anydbm_read3   s    
c         C   s9   |  i    t i t d  } |  i |  } | i   d  S(   NR'   (   R%   R   R   R   t   keys_helperR!   (   R   R   R   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   test_anydbm_keys9   s    
c         C   sB   |  i  |  } x, |  i D]! } |  i |  i | | |  q Wd  S(   N(   R)   R   R   (   R   R   R   R"   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyR    ?   s    
 c         C   sE   t  i t d  } x" |  i D] } |  i | | | <q W| i   d  S(   Nt   n(   R   R   R   R   R!   (   R   R   t   k(    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyR%   D   s
    
 c         C   sC   | i    } | i   |  i i    } | i   |  i | |  | S(   N(   R   t   sortR   R   (   R   R   R   t   dkeys(    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyR)   J   s    

c         C   s   t    d  S(   N(   R   (   R   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   tearDownR   s    c         C   s   t    d  S(   N(   R   (   R   (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   setUpU   s    (   t   __name__t
   __module__R   R   R#   R&   R(   R*   R    R%   R)   R/   R0   (    (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyR	      s"   

									c           C   s    z t  i t  Wd  t   Xd  S(   N(   R    t   run_unittestR	   R   (    (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt	   test_mainX   s    t   __main__(   t   __doc__R   R   R   R   t   testR    t   TESTFNR   R   R   R	   R4   R1   (    (    (    s-   /mit/python/lib/python2.6/test/test_anydbm.pyt   <module>   s   			A	