ó
wŪjc           @   s   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z d e j	 f d     YZ
 d   Z e d k r e   n  d S(   i’’’’N(   t   test_supportt   PyCompileTestsc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   sĄ   t  j d t j    |  _ t j j |  j d  |  _ |  j d |  _ t j j	 t j    d |  _
 t j j	 |  j  d } | r t j |  n  t |  j d   } | j d  Wd  QXd  S(   Nt   dirs   _test.pyt   ci    t   ws   x = 123
(   t   tempfilet   mkdtempt   ost   getcwdt	   directoryt   patht   joint   source_patht   pyc_patht
   splitdrivet	   cwd_drivet   chdirt   opent   write(   t   selft   drivet   file(    (    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_py_compile.pyt   setUp   s    c         C   s0   t  j |  j  |  j r, t j |  j  n  d  S(   N(   t   shutilt   rmtreeR	   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_py_compile.pyt   tearDown   s    	c         C   s6   t  j |  j |  j  |  j t j j |  j   d  S(   N(   t
   py_compilet   compileR   R   t
   assertTrueR   R
   t   exists(   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_py_compile.pyt   test_absolute_path!   s    c         C   sg   t  j |  j  3 t j t j j |  j  t j j |  j	   Wd  QX|  j
 t j j |  j	   d  S(   N(   t   supportt
   change_cwdR	   R   R   R   R
   t   basenameR   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_py_compile.pyt   test_cwd%   s    c         C   sN   t  j t j j |  j  t j j |  j   |  j t j j |  j   d  S(   N(	   R   R   R   R
   t   relpathR   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_py_compile.pyt   test_relative_path+   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_py_compile.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_py_compile.pyt	   test_main0   s    t   __main__(   t   impR   R   R   R   t   unittestt   testR    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_py_compile.pyt   <module>   s   &	