mς
­fIc           @   s   d  Z  d k Z d k Z d k Z d k Z 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
N(   s   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   ft   ost   unlinkt   OSError(   R   (    (    t-   /mit/python/lib/python2.4/test/test_anydbm.pyt   _delete_files   s     t   AnyDBMTestCasec           B   s§   t  Z h  d d <d d <d d <d d <d	 d
 <d d <d d <Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z RS(   Nt   0t    t   as   Python:t   bt   Programmingt   ct   thet   dt   wayR   t   Guidot   gt   intendedc         G   s   t  i i |  |  d  S(   N(   t   unittestt   TestCaset   __init__t   selft   args(   R   R   (    (    R   R   !   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   R   R   t   assertEqualt   keyst   _dictt   keyt   read_helpert   close(   R   R    R   (    (    R   t   test_anydbm_creation$   s    
 c         C   sL   |  i   t i t d  } d |  i d <| d <|  i |  | i   d  S(   NR   t   indentedR   (	   R   t   init_dbR   R   R   R   R   R!   R"   (   R   R   (    (    R   t   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"   (   R   R   (    (    R   t   test_anydbm_read3   s    
c         C   s9   |  i   t i t d  } |  i |  } | i   d  S(   NR'   (	   R   R%   R   R   R   R   t   keys_helperR   R"   (   R   R   R   (    (    R   t   test_anydbm_keys9   s    
c         C   sB   |  i |  } x, |  i D]! } |  i |  i | | |  q Wd  S(   N(   R   R)   R   R   R   R    R   (   R   R   R   R    (    (    R   R!   ?   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   t   kR"   (   R   R,   R   (    (    R   R%   D   s
    
 c         C   sC   | i   } | i   |  i i   } | i   |  i | |  | S(   N(   R   R   t   sortR   R   t   dkeysR   (   R   R   R   R.   (    (    R   R)   J   s    

c         C   s   t    d  S(   N(   R   (   R   (    (    R   t   tearDownR   s    c         C   s   t    d  S(   N(   R   (   R   (    (    R   t   setUpU   s    (   t   __name__t
   __module__R   R   R#   R&   R(   R*   R!   R%   R)   R/   R0   (    (    (    R   R	      s   E										c           C   s    z t  i t  Wd  t   Xd  S(   N(   t   test_supportt   run_unittestR	   R   (    (    (    R   t	   test_mainX   s     t   __main__(   t   __doc__R   R   R   R   t   testR3   t   TESTFNR   R   R   R	   R5   R1   (	   R3   R   R   R   R	   R5   R   R   R   (    (    R   t   ?   s   							A	