ó
X\ŹQc           @   s   d  Z  d d l Z d d l Z d d l Z d d l m Z m Z m Z m Z d e j	 f d     YZ
 d   Z e d k r e j d d	  n  d S(
   s   TestCase for reseting File ID.
i˙˙˙˙N(   t   dbt   test_supportt   get_new_environment_patht   get_new_database_patht   FileidResetTestCasec           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s(   t    |  _ t    |  _ t   |  _ d  S(   N(   R   t	   db_path_1t	   db_path_2R   t   db_env_path(   t   self(    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyt   setUp   s    c         C   sŐ  t  j   |  _ |  j j |  j d t  j d t  j t  j B|  j j d d  |  j j	   t
 j |  j |  j  t  j   |  _ |  j j |  j d t  j |  j j d d  |  j j	   t  j   |  _ |  j j |  j t  j t  j B |  j j |  j  t  j |  j  |  _ |  j j |  j d t  j d t  j |  j |  j j d  d  t  j |  j  |  _ |  j j |  j d t  j d t  j |  j |  j j d  d  |  j j	   |  j j	   |  j j	   d  S(   Nt   dbtypet   flagst   spamt   eggs(   R    t   DBt   db1t   openR   t   DB_HASHt	   DB_CREATEt   DB_EXCLt   putt   closet   shutilt   copyR   t   db2t   DBEnvt   db_envR   t   DB_INIT_MPOOLt   fileid_resett	   DB_RDONLYt   assertEqualt   get(   R   (    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyt   test_fileid_reset   s*    , %%c         C   s4   t  j |  j  t  j |  j  t  j |  j  d  S(   N(   R   t   unlinkR   R   t   rmtreeR   (   R   (    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyt   tearDown1   s    (   t   __name__t
   __module__R	   R    R#   (    (    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyR   
   s   		!c          C   s;   t  j   }  t j   d k r7 |  j t  j t   n  |  S(   Ni   (   i   i   (   t   unittestt	   TestSuiteR    t   versiont   addTestt	   makeSuiteR   (   t   suite(    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyt
   test_suite6   s    t   __main__t   defaultTestR,   (   t   __doc__t   osR   R&   t   test_allR    R   R   R   t   TestCaseR   R,   R$   t   main(    (    (    s^   /tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_fileid.pyt   <module>   s   ",	