%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/mapping_tests.pyo |
ó Nêáac @ sy d d l Z d d l Z d d l Z d d l Z d e j f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d S( iÿÿÿÿNt BasicTestMappingProtocolc B s° e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s i d d 6d d 6d d 6S( s^ Return a dictionary of values which are invariant by storage in the object under test.i i t value1t key1i t key2( i i i ( ( t self( ( s. /usr/local/lib/python2.7/test/mapping_tests.pyt _reference s c C s | j ƒ S( s Return an empty mapping object( t type2test( R ( ( s. /usr/local/lib/python2.7/test/mapping_tests.pyt _empty_mapping s c C s7 | j ƒ } x$ | j ƒ D] \ } } | | | <q W| S( sK Return a mapping object with the value contained in data dictionary( R t items( R t datat xt keyt value( ( s. /usr/local/lib/python2.7/test/mapping_tests.pyt _full_mapping s c O s† t j j | | | Ž | j ƒ j ƒ | _ | j j ƒ \ } } i | | 6| _ | j j ƒ \ } } i | | 6| _ | | j | <d S( N( t unittestt TestCaset __init__R t copyt referencet popitemt othert inmapping( R t argst kwR R ( ( s. /usr/local/lib/python2.7/test/mapping_tests.pyR s c s> ˆ j ƒ } t | ƒ } ˆ j ˆ j ƒ ‰ ˆ | k r? | } n x1 ˆ j j ƒ D] \ } } ˆ j ˆ | | ƒ qO Wˆ j j ƒ d ‰ ˆ j t ‡ ‡ f d † ƒ ˆ j t | ƒ d ƒ ˆ j t ˆ ƒ t ˆ j ƒ ƒ x! ˆ j D] } ˆ j | ˆ ƒ qá Wx! ˆ j D] } ˆ j | ˆ ƒ qWt j d t ƒ Y x' ˆ j D] } ˆ j ˆ j | ƒ ƒ q<Wx' ˆ j D] } ˆ j ˆ j | ƒ ƒ qfWWd QXˆ j t | | ƒ d ƒ ˆ j t ˆ ˆ ƒ d ƒ ˆ j t | ˆ ƒ d ƒ ˆ j t ˆ | ƒ d ƒ | rˆ j d ƒ n ˆ sˆ j d ƒ n ‡ f d † } | ˆ j ƒ ˆ j ƒ ˆ j j ƒ ƒ | t ˆ ƒ ˆ j ƒ ˆ j j ƒ ƒ | ˆ j ƒ ˆ j ƒ ˆ j j ƒ ƒ | ˆ j ƒ ˆ j ƒ ˆ j j ƒ ƒ ˆ j ƒ j ƒ \ } } ˆ j j ƒ j ƒ \ ‰ } ˆ j ˆ j | | ƒ | ƒ ˆ j ˆ j ˆ | ƒ | ƒ ˆ j ˆ ˆ ƒ d S( Ni c s ˆ ˆ S( N( ( ( t dt knownkey( s. /usr/local/lib/python2.7/test/mapping_tests.pyt <lambda>7 t t quietiÿÿÿÿi s# Empty mapping must compare to Falses! Full mapping must compare to Truec sq ˆ j t | d ƒ ƒ ˆ j t | d ƒ ƒ t | ƒ } ˆ j t | ƒ t | ƒ k og t | ƒ k n ƒ d S( Nt nextt __iter__( t assertTruet hasattrt listt set( t itert lstt refR ( R ( s. /usr/local/lib/python2.7/test/mapping_tests.pyt check_iterandlistO s ( R t dictR R R t assertEqualR t keyst assertRaisest KeyErrort lent assertInt assertNotInt test_supportt check_py3k_warningst TrueR t has_keyt assertFalset cmpt failt iterkeysR# t itervaluest valuest iteritemsR t get( R t pt p1R R t kR&