ó
‹wÛjc           @   s¿   d  d l  Z  d  d l Z d  d l Z d  d l m Z e j d ƒ Z d  d l Z d  d l	 Z	 e j
 d Z e  j e j d k  d ƒ Z d e  j f d	 „  ƒ  YZ d
 „  Z e d k r» e ƒ  n  d S(   iÿÿÿÿN(   t   test_supportt   MacOSt   2i   i    s   32-bit only testt   TestMacostoolsc           B   s�   e  Z d  „  Z d „  Z d „  Z d „  Z e d „  ƒ Z e d „  ƒ Z e e	 j
 e j j e j ƒ d e j ƒ d „  ƒ ƒ Z RS(   c         C   sY   t  t j d ƒ } | j d ƒ | j ƒ  t j t j d ƒ } | j d ƒ | j ƒ  d  S(   Nt   ws   hello world
s   *wbs   goodbye world
(   t   openR    t   TESTFNt   writet   closeR   t   openrf(   t   selft   fpt   rfp(    (    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_macostools.pyt   setUp   s    
c         C   s!   t  j t  j ƒ t  j t ƒ d  S(   N(   R    t   unlinkR   t   TESTFN2(   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_macostools.pyt   tearDown   s    c         C   sÊ   t  t j d ƒ } | j ƒ  } | j ƒ  t  t d ƒ } | j ƒ  } | j ƒ  | | k r] d St j t j d ƒ } | j d ƒ } | j ƒ  t j t d ƒ } | j d ƒ } | j ƒ  | | k rÆ d Sd S(   Nt   rs   Data forks differs   *rbiè  s   Resource forks differt    (   R   R    R   t   readR   R   R   R	   (   R
   R   t   data1t   data2R   (    (    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_macostools.pyt   compareData   s"    



c         C   s6   t  j d t f d t ƒ� t j t  j ƒ Wd  QXd  S(   Ns   macostools.touched*t   quiet(   R    t   check_warningst   DeprecationWarningt   Truet
   macostoolst   touchedR   (   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_macostools.pyt   test_touched2   s    	c         C   s:   t  j t ƒ t j t  j t ƒ |  j |  j ƒ  d ƒ d  S(   NR   (   R    R   R   R   t   copyR   t   assertEqualR   (   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_macostools.pyt	   test_copy8   s    c         C   sg   t  j t ƒ t j t  j t ƒ t j j t d ƒ \ } } } |  j	 | j
 ƒ  t j j t  j ƒ ƒ d  S(   Ni    (   R    R   R   R   t   mkaliasR   t   Carbont   Filet   ResolveAliasFileR   t   as_pathnamet   ost   patht   realpath(   R
   t   fsst   _(    (    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_macostools.pyt   test_mkalias>   s    s   %r doesn't existc         C   sm   t  j t ƒ t j t  j t t j ƒ t j	 j
 t d ƒ \ } } } |  j | j ƒ  t j j t  j ƒ ƒ d  S(   Ni    (   R    R   R   R   R!   R   t   syst   prefixR"   R#   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_macostools.pyt   test_mkalias_relativeE   s    (   t   __name__t
   __module__R   R   R   R   t   requires_32bitR    R+   t   unittestt
   skipUnlessR&   R'   t   existsR,   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_macostools.pyR      s   				c           C   s>   t  d j d ƒ ƒ d k r- t j d ƒ ‚ n  t j t ƒ d  S(   Nu    s   unicode-internali   s!   test_macostools is broken in USC4(   t   lent   encodeR2   t   SkipTestR    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_macostools.pyt	   test_mainT   s    t   __main__I       (   R2   R&   R,   t   testR    t   import_moduleR   t   Carbon.FileR"   R   R   R   R3   t   maxintR1   t   TestCaseR   R9   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_macostools.pyt   <module>   s   C	