ó
‹wÛjc        
   @   s«  d  d l  Z  d  d l Z d  d l Z d  d l m Z d  d l m Z d d d d d d	 d
 d d d g
 Z e  j d k r¢ e j	 d d d d d d d d d g	 ƒ n  e j
 j se  j ƒ  pÃ e  j ƒ  Z y" x e D] Z e j e ƒ qÐ WWqe k
 r
e j d ƒ ‚ qXn  d „  Z d e j f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d  e f d! „  ƒ  YZ d" e f d# „  ƒ  YZ d$ „  Z e d% k r§e ƒ  n  d S(&   iÿÿÿÿN(   t	   normalize(   t   test_supportt   1_abcu   2_asciiu   3_GrÃ¼ÃŸ-Gottu   4_Î“ÎµÎ¹Î¬-ÏƒÎ±Ï‚u   5_Ð—Ð´Ñ€Ð°Ð²Ñ�Ñ‚Ð²ÑƒÐ¹Ñ‚Ðµu   6_ã�«ã�½ã‚“u   7_×”×©×§×¦×¥×¡u   8_æ›¨æ›©æ›«u   9_æ›¨×©ã‚“Ð´Î“ÃŸu	   10_á¿®á¿½t   darwinu	   11_Î…Ï“Ï”u   12_Â¨Ì�Ï’Ì�Ï’Ìˆu   13_ ÌˆÌ�ÎŽÎ«u   14_áº›á¿�á¿�á¿Žá¿�á¿�á¿žá¿Ÿá¿­u   15_á¿®á¿½ï«‘u   16_â€€â€€â€€Au   17_â€�â€�â€�Au   18_â€ƒâ€ƒâ€ƒAu   19_   As>   only NT+ and systems with Unicode-friendly filesystem encodingc         C   sb   t  j j |  ƒ r^ x9 t  j t |  ƒ ƒ D]" } t  j t  j j |  | ƒ ƒ q( Wt  j |  ƒ n  d  S(   N(   t   ost   patht   existst   listdirt   unicodet   unlinkt   joint   rmdir(   t   dirnamet   fname(    (    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_pep277.pyt   deltree9   s     t   UnicodeFileTestsc           B   s­   e  Z e e ƒ Z d Z d  „  Z d „  Z d „  Z	 e
 d „ Z d „  Z d „  Z e j e j d k d ƒ d „  ƒ Z e j e j d k d ƒ d	 „  ƒ Z d
 „  Z d „  Z RS(   c         C   s¿   y t  j t j ƒ Wn t k
 r' n Xt ƒ  } x~ |  j D]s } t  j j t j |  j	 | ƒ ƒ } t
 | d ƒ �! } | j | d j d ƒ ƒ Wd  QXt  j | ƒ | j | ƒ q; W| |  _ d  S(   Nt   ws   
s   utf-8(   R   t   mkdirR   t   TESTFNt   OSErrort   sett   filesR   R
   t   normt   opent   writet   encodet   statt   add(   t   selfR   t   namet   f(    (    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_pep277.pyt   setUpG   s    	! c         C   s   t  t j ƒ d  S(   N(   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_pep277.pyt   tearDownU   s    c         C   s,   |  j  r( t | t ƒ r( t |  j  | ƒ S| S(   N(   t   normal_formt
   isinstanceR   R    (   R   t   s(    (    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_pep277.pyR   X   s    c         C   s…   |  j  | ƒ � } | | ƒ Wd  QX| j j } t | t ƒ rU | j t j ƒ  ƒ } n  | r� |  j | | d | j	 | | f ƒ n  d  S(   Ns>   Function '%s(%r) failed with bad filename in the exception: %r(
   t   assertRaisest	   exceptiont   filenameR"   t   strR   t   syst   getfilesystemencodingt   assertEqualt   __name__(   R   t   fnR&   t   expected_exceptiont   check_fn_in_exceptiont   ct   exc_filename(    (    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_pep277.pyt   _apply_failure]   s    c         C   s¦   xŸ |  j  D]” } d | } |  j t | t ƒ |  j t j | t ƒ |  j t j | t ƒ |  j t j | t ƒ |  j t j	 | t ƒ |  j t j
 | t t ƒ q
 Wd  S(   Nt   not_(   R   R1   R   t   IOErrorR   R   R   t   chdirR   t   removeR   t   False(   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_pep277.pyt   test_failuresj   s    
c         C   sX   xQ |  j  D]F } t | d ƒ } | j | d j d ƒ ƒ | j ƒ  t j | ƒ q
 Wd  S(   NR   s   
s   utf-8(   R   R   R   R   t   closeR   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_pep277.pyt	   test_openv   s
    
R   s   irrelevant test on Mac OS Xc            s  t  d „  |  j Dƒ ƒ } t  ƒ  } x@ t  d d d d g ƒ D]& ‰  | t  ‡  f d †  | Dƒ ƒ O} q; W| | 8} x’ | D]Š } |  j t | t ƒ |  j t j | t ƒ |  j t j | t ƒ |  j t j	 | t ƒ |  j t j
 | t ƒ |  j t j | t t ƒ qv Wd  S(   Nc         s   s$   |  ] } t  | t ƒ r | Vq d  S(   N(   R"   R   (   t   .0R   (    (    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_pep277.pys	   <genexpr>ƒ   s    t   NFCt   NFDt   NFKCt   NFKDc         3   s   |  ] } t  ˆ  | ƒ Vq d  S(   N(   R    (   R:   t   file(   t   nf(    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_pep277.pys	   <genexpr>†   s    (   R   R   R1   R   R3   R   R   R   R4   R   R5   R   R6   (   R   R   t   othersR   (    (   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_pep277.pyt   test_normalize�   s    	$
c         C   sˆ   t  |  j ƒ } t j t j ƒ } t j t t j t j ƒ  ƒ ƒ } t  d „  | Dƒ ƒ } |  j	 | | ƒ |  j	 t
 | ƒ t
 | ƒ ƒ d  S(   Nc         s   s-   |  ]# } t  j j t t j ƒ | ƒ Vq d  S(   N(   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_pep277.pys	   <genexpr>š   s    (   R   R   R   R   R   R   R   R(   R)   R*   t   len(   R   t   sf0t   f1t   f2t   sf2(    (    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_pep277.pyt   test_listdir”   s    c         C   s8   x1 |  j  D]& } t j | d ƒ t j d | ƒ q
 Wd  S(   Nt   tmp(   R   R   t   rename(   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_pep277.pyt   test_renamež   s    c         C   sŠ   t  j j t j d ƒ } d } t j | ƒ �W t | d ƒ �! } | j | d j d ƒ ƒ Wd  QXt  j	 | t  j
 ƒ t  j | ƒ Wd  QXd  S(   Nu   GrÃ¼ÃŸ-æ›¨æ›©æ›«u   ÃŸ-æ›¨æ›©æ›«R   s   
s   utf-8(   R   R   R
   R   R   t   temp_cwdR   R   R   t   accesst   R_OKR5   (   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_pep277.pyt   test_directory£   s    	 N(   R+   t
   __module__R   t	   filenamesR   t   NoneR!   R   R    R   t   TrueR1   R7   R9   t   unittestt   skipIfR(   t   platformRB   RH   RK   RO   (    (    (    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_pep277.pyR   C   s   					$$
	t   UnicodeNFCFileTestsc           B   s   e  Z d  Z RS(   R;   (   R+   RP   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_pep277.pyRW   ®   s   t   UnicodeNFDFileTestsc           B   s   e  Z d  Z RS(   R<   (   R+   RP   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_pep277.pyRX   ²   s   t   UnicodeNFKCFileTestsc           B   s   e  Z d  Z RS(   R=   (   R+   RP   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_pep277.pyRY   ¶   s   t   UnicodeNFKDFileTestsc           B   s   e  Z d  Z RS(   R>   (   R+   RP   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_pep277.pyRZ   º   s   c           C   s2   z t  j t t t t t ƒ Wd  t t  j ƒ Xd  S(   N(	   R   t   run_unittestR   RW   RX   RY   RZ   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_pep277.pyt	   test_main¾   s    t   __main__(   R(   R   RT   t   unicodedataR    t   testR   RQ   RV   t   extendR   t   supports_unicode_filenamesR)   t   getdefaultencodingt
   fsencodingR   R   t   UnicodeEncodeErrort   SkipTestR   t   TestCaseR   RW   RX   RY   RZ   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_pep277.pyt   <module>   sN   $			
k	