ó
ŠwÛjc        
   @   s  d  d l  Z  d  d l Z d  d l m Z d  d l Z e j d ƒ Z d  d l Z d Z d Z	 d Z
 d Z e j d e e	 d	 d
 ƒ e j d d d e e
 ƒ d
 d e e
 ƒ e e ƒ ƒ e
 e 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   MacOSi  i   s   hello world
s   goodbye
cruel worlds   >ll16sht   fooi   s   >lllllli   i2   t   2t   TestApplesinglec           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s-   t  t j d ƒ } | j t ƒ | j ƒ  d  S(   Nt   w(   t   openR    t   TESTFNt   writet   applesingledatat   close(   t   selft   fp(    (    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_applesingle.pyt   setUp   s    c         C   s=   y t  j t j ƒ Wn n Xy t  j t ƒ Wn n Xd  S(   N(   t   ost   unlinkR    R   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_applesingle.pyt   tearDown   s    c         C   sM   | r t  j t d ƒ } n t t d ƒ } | j d ƒ } |  j | | ƒ d  S(   Ns   *rbt   rbiè  (   R   t   openrfR   R   t   readt   assertEqual(   R   t   isrft   dataR   t   filedata(    (    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_applesingle.pyt   compareData)   s
    c         C   sR   y t  j t ƒ Wn n Xt j t j t ƒ |  j t t	 ƒ |  j t
 t ƒ d  S(   N(   R   R   R   t   applesinglet   decodeR    R   R   t   Falset   dataforkdatat   Truet   resourceforkdata(   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_applesingle.pyt   test_applesingle1   s    c         C   sH   y t  j t ƒ Wn n Xt j t j t d t ƒ|  j t	 t
 ƒ d  S(   Nt   resonly(   R   R   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_applesingle.pyt   test_applesingle_resonly:   s    (   t   __name__t
   __module__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_applesingle.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_applesingle.pyt	   test_mainB   s    t   __main__(   t   unittestR   t   testR    t   structt   import_moduleR   R   t   AS_MAGICt
   AS_VERSIONR   R   t   packt   lenR	   R   R   t   TestCaseR   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_applesingle.pyt   <module>   s    Q*	