ó
‹wÛjc           @   sŒ   d  d l  Z  d  d l m Z d  d l Z d  d l Z e j d ƒ Z e j d Z d e  j	 f d „  ƒ  YZ
 d „  Z e d k rˆ e ƒ  n  d S(	   iÿÿÿÿN(   t   test_supportt   MacOSt   2t	   TestMacOSc           B   s_   e  Z e j e j j d  ƒ d ƒ d „  ƒ Z e j e j j d ƒ d ƒ d „  ƒ Z d „  Z	 RS(   s   /Developer/Tools/SetFiles'   /Developer/Tools/SetFile does not existc         C   sŸ   z‡ t  t j d ƒ } | j d ƒ | j ƒ  t j d d d d d t j g ƒ t j t j ƒ \ } } |  j	 | d ƒ |  j	 | d ƒ Wd  t
 j t j ƒ Xd  S(   Nt   ws   
s   /Developer/Tools/SetFiles   -tt   ABCDs   -ct   EFGH(   t   openR    t   TESTFNt   writet   closet
   subprocesst   callR   t   GetCreatorAndTypet   assertEqualt   ost   unlink(   t   selft   fpt   crt   tp(    (    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_macos.pyt   testGetCreatorAndType   s    
s   /Developer/Tools/GetFileInfos+   /Developer/Tools/GetFileInfo does not existc         C   sS  z;t  t j d ƒ } | j d ƒ | j ƒ  t j t j d d ƒ t j t j ƒ \ } } |  j | d ƒ |  j | d ƒ t	 j
 d t j g d t	 j ƒj ƒ  d } d  } d  } xf | j ƒ  D]X } | j d ƒ rí | j ƒ  d	 d
 d	 !} n  | j d ƒ r¾ | j ƒ  d	 d
 d	 !} q¾ q¾ W|  j | d ƒ |  j | d ƒ Wd  t j t j ƒ Xd  S(   NR   s   
R   R   s   /Developer/Tools/GetFileInfot   stdouti    s   type:iÿÿÿÿi   s   creator:(   R   R    R   R	   R
   R   t   SetCreatorAndTypeR   R   R   t   Popent   PIPEt   communicatet   Nonet
   splitlinest
   startswitht   splitR   R   (   R   R   R   R   t   datat   ln(    (    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_macos.pyt   testSetCreatorAndType   s*    

c         C   s  zî t  t j d ƒ } | j d ƒ | j ƒ  t j t j d ƒ } | j d ƒ | j ƒ  t  t j d ƒ } | j ƒ  } | j ƒ  |  j | d ƒ t j t j d ƒ } | j d ƒ } | j d ƒ } | j ƒ  |  j | d ƒ |  j | d ƒ Wd  t	 j
 t j ƒ Xd  S(	   NR   s   hello world
s   *wbs   goodbye world
t   rs   *rbid   t    (   R   R    R   R	   R
   R   t   openrft   readR   R   R   (   R   R   t   rfpR   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_macos.pyt
   testOpenRF?   s$    



(
   t   __name__t
   __module__t   unittestt
   skipUnlessR   t   patht   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_macos.pyR   
   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_macos.pyt	   test_mainZ   s    t   __main__(   R+   t   testR    R   R   t   import_moduleR   R   t   TESTFN2t   TestCaseR   R0   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_macos.pyt   <module>   s   P	