%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/bsddb/test/ |
Current File : //usr/local/lib/python2.7/bsddb/test/test_compat.pyc |
ó Oêáac @ 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 m Z m Z d e j f d „ ƒ YZ d „ Z e d k r™ e j d d ƒ n d S( sU Test cases adapted from the test_bsddb.py module in Python's regression test suite. iÿÿÿÿN( t dbt hashopent btopent rnopent verboset get_new_database_patht CompatibilityTestCasec B sG e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s t ƒ | _ d S( N( R t filename( t self( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt setUp s c C s/ y t j | j ƒ Wn t j k r* n Xd S( N( t ost removeR t error( R ( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt tearDown s c C s | j t d ƒ d S( NR ( t do_bthash_testR ( R ( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt test01_btopen s c C s | j t d ƒ d S( NR ( R R ( R ( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt test02_hashopen s c C s d j ƒ } t r d GHn t | j d ƒ } x, t t | ƒ ƒ D] } | | | | d <q? W| d | d | d f } t rˆ d | GHn | j | d d d ƒ | j d ƒ } | d k rÔ | j d t | ƒ ƒ n d | d <| j ƒ ~ t | j d ƒ } d | d <d „ } | j t | | ƒ d „ } | j t | | ƒ | d =| j ƒ } x= | r‘t ri| GHn y | j ƒ } WqUt k rPqUXqUW| j ƒ d S( Ns- The quick brown fox jumped over the lazy dog.s Testing: rnopent ci i i s %s %s %st quicks data mismatch!t browns$ recno database set_location failed: s twenty-fivei t wt twentyi c S s | d } d S( Ni ( ( t ft rec( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt noRec8 s c S s | d } d S( Ns a string( ( R R ( ( s2 /usr/local/lib/python2.7/bsddb/test/test_compat.pyt badKey<