ó
‹wÛjc           @   sŽ   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z d j d d ƒ Z d e  j f d „  ƒ  YZ	 d	 „  Z
 e d
 k rŠ e
 ƒ  n  d S(   iÿÿÿÿN(   t   test_supports  <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>aDate</key>
        <date>2004-10-26T10:33:33Z</date>
        <key>aDict</key>
        <dict>
                <key>aFalseValue</key>
                <false/>
                <key>aTrueValue</key>
                <true/>
                <key>aUnicodeValue</key>
                <string>MÃ¤ssig, MaÃŸ</string>
                <key>anotherString</key>
                <string>&lt;hello &amp; 'hi' there!&gt;</string>
                <key>deeperDict</key>
                <dict>
                        <key>a</key>
                        <integer>17</integer>
                        <key>b</key>
                        <real>32.5</real>
                        <key>c</key>
                        <array>
                                <integer>1</integer>
                                <integer>2</integer>
                                <string>text</string>
                        </array>
                </dict>
        </dict>
        <key>aFloat</key>
        <real>0.5</real>
        <key>aList</key>
        <array>
                <string>A</string>
                <string>B</string>
                <integer>12</integer>
                <real>32.5</real>
                <array>
                        <integer>1</integer>
                        <integer>2</integer>
                        <integer>3</integer>
                </array>
        </array>
        <key>aString</key>
        <string>Doodah</string>
        <key>anInt</key>
        <integer>728</integer>
        <key>nestedData</key>
        <array>
                <data>
                PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5r
                PgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5
                IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBi
                aW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3Rz
                IG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQID
                PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAw==
                </data>
        </array>
        <key>someData</key>
        <data>
        PGJpbmFyeSBndW5rPg==
        </data>
        <key>someMoreData</key>
        <data>
        PGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8
        bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAzxs
        b3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxv
        dHMgb2YgYmluYXJ5IGd1bms+AAECAzxsb3RzIG9mIGJpbmFyeSBndW5rPgABAgM8bG90
        cyBvZiBiaW5hcnkgZ3Vuaz4AAQIDPGxvdHMgb2YgYmluYXJ5IGd1bms+AAECAw==
        </data>
        <key>Ã…benraa</key>
        <string>That was a unicode key.</string>
</dict>
</plist>
t    i   s   	t   TestPlistlibc           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 RS(   c         C   s"   y t  j t j ƒ Wn n Xd  S(   N(   t   ost   unlinkR    t   TESTFN(   t   self(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   tearDown\   s    c         C   sâ   t  d d d d d d d d d	 d
 g g d d d d d t  d d d d d t d t d t  d d d d d d d	 d g ƒ ƒ d t j d ƒ d t j d d  ƒ d! t j d d  ƒ g d" t j d# d  d$ d  d% d% ƒ ƒ 	} d& | d' <| S((   Nt   aStringt   Doodaht   aListt   At   Bi   g     @@@i   i   i   t   aFloatg      à?t   anIntiØ  t   aDictt   anotherStrings   <hello & 'hi' there!>t   aUnicodeValueu   MÃ¤ssig, MaÃŸt
   aTrueValuet   aFalseValuet
   deeperDictt   ai   t   bt   ct   textt   someDatas   <binary gunk>t   someMoreDatas   <lots of binary gunk> i
   t
   nestedDatat   aDateiÔ  i   i!   s   That was a unicode key.u   Ã…benraa(   t   dictt   Truet   Falset   plistlibt   Datat   datetime(   R   t   pl(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   _createb   s"    '!
c         C   s<   |  j  ƒ  } |  j | d d ƒ |  j | d d t ƒ d  S(   NR   R	   R   R   (   R$   t   assertEqualR   (   R   R#   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_createw   s    c         C   sQ   |  j  ƒ  } t j | t j ƒ t j t j ƒ } |  j t | ƒ t | ƒ ƒ d  S(   N(   R$   R    t
   writePlistR    R   t	   readPlistR%   R   (   R   R#   t   pl2(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_io|   s    c         C   si   |  j  ƒ  } t j | ƒ } t j | ƒ } |  j t | ƒ t | ƒ ƒ t j | ƒ } |  j | | ƒ d  S(   N(   R$   R    t   writePlistToStringt   readPlistFromStringR%   R   (   R   R#   t   dataR)   t   data2(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_string‚   s    c         C   sT   i t  j d ƒ d 6g g g g g g g g } |  j t  j t  j | ƒ ƒ | ƒ d  S(   Nt   aaaaaat   test(   R    R!   R%   R,   R+   (   R   R-   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_indentation_arrayŠ   s    .c         C   st   i i i i i i i i i t  j d ƒ d 6d 6d 6d 6d 6d 6d 6d	 6d
 6} |  j t  j t  j | ƒ ƒ | ƒ d  S(   NR0   t   9t   8t   7t   6t   5t   4t   3t   2t   1(   R    R!   R%   R,   R+   (   R   R-   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_indentation_dictŽ   s    Nc         C   sc   i i i i t  j d ƒ d 6g g g g g d 6g d 6d 6} |  j t  j t  j | ƒ ƒ | ƒ d  S(   NR0   R1   R9   R:   R;   (   R    R!   R%   R,   R+   (   R   R-   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_indentation_dict_mix’   s    =c         C   s5   t  j t ƒ } t  j | ƒ } |  j | t d ƒ d  S(   Ns2   generated data was not identical to Apple's output(   R    R,   t   TESTDATAR+   R%   (   R   R#   R-   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_appleformatting–   s    c         C   s>   |  j  ƒ  } t j t ƒ } |  j t | ƒ t | ƒ d ƒ d  S(   Ns2   generated data was not identical to Apple's output(   R$   R    R,   R>   R%   R   (   R   R#   R)   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_appleformattingfromliteralœ   s    c         C   sp   d d l  m  } | ƒ  } |  j ƒ  } t j | | ƒ t j | | j ƒ  ƒ ƒ } |  j t | ƒ t | ƒ ƒ d  S(   Niÿÿÿÿ(   t   StringIO(   RA   R$   R    R'   R(   t   getvalueR%   R   (   R   RA   t   fR#   R)   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_stringio¢   s    	c         C   sp   d d l  m } | ƒ  } |  j ƒ  } t j | | ƒ t j | | j ƒ  ƒ ƒ } |  j t | ƒ t | ƒ ƒ d  S(   Niÿÿÿÿ(   RA   (	   t	   cStringIORA   R$   R    R'   R(   RB   R%   R   (   R   RA   RC   R#   R)   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_cstringioª   s    	c         C   so   xh t  d ƒ D]Z } t | ƒ } d | } | d k sA | d k rQ t j | ƒ q |  j t t j | ƒ q Wd  S(   Ni€   s   string containing %si    s   
	(   t   ranget   chrR    R+   t   assertRaisest
   ValueError(   R   t   iR   t
   testString(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_controlcharacters²   s    
	c         C   sl   d } d d d d g } t  j t  j | ƒ ƒ } t  j t  j | ƒ ƒ } |  j | | ƒ |  j | | ƒ d  S(   Nt   abci   i   i   (   R    R,   R+   R%   (   R   t   test1t   test2t   result1t   result2(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   test_nondictroot¾   s    (   t   __name__t
   __module__R   R$   R&   R*   R/   R2   R<   R=   R?   R@   RD   RF   RM   RS   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyR   Z   s   													c           C   s   t  j t ƒ d  S(   N(   R    t   run_unittestR   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt	   test_mainÇ   s    t   __main__s           (   t   unittestR    R   R"   R1   R    t   replaceR>   t   TestCaseR   RW   RT   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_plistlib.pyt   <module>   s   Pm	