ó
Ú6e]c           @` s%  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m	 Z
 m Z m Z d d l Z d d l Z d d l m Z d d l m Z m Z e e
 e e j ƒ d d ƒ ƒ Z d	 „  Z e j j e d
 d ƒe j j d
 d ƒ e j j d e ƒ  ƒ d „  ƒ ƒ ƒ Z d „  Z d S(   s\    Test scripts

Test that we can run executable scripts that have been installed with numpy.
i    (   t   divisiont   print_functiont   absolute_importN(   t   joint   isfilet   dirname(   t
   basestring(   t   assert_t   assert_equals   ..s   setup.pyc          C` s§   t  j d k r_ t t  j ƒ }  |  j d ƒ rC t j j |  d ƒ g St j j |  d d ƒ g SnD t  j } t	 | j
 ƒ } t	 | j ƒ } d d | d | d | g Sd  S(   Nt   win32t   Scriptst   f2pyt   .(   t   syst   platformR   t
   executablet   endswitht   ost   pathR   t   version_infot   strt   majort   minor(   t   exe_dirt   versionR   R   (    (    s7   lib/python2.7/site-packages/numpy/tests/test_scripts.pyt   find_f2py_commands   s    	t   reasons    Cannot test f2py command inplaces   Test is unreliablet   f2py_cmdc         C` s,   t  j |  d g ƒ } t | j ƒ  d ƒ d  S(   Ns   -vt   2(   t
   subprocesst   check_outputR   t   strip(   R   t   stdout(    (    s7   lib/python2.7/site-packages/numpy/tests/test_scripts.pyt	   test_f2py&   s    c          C` s2   t  j t j d d g ƒ }  t |  j ƒ  d ƒ d  S(   Ns   -mnumpy.f2pys   -vR   (   R   R   R   R   R   R   (   R    (    (    s7   lib/python2.7/site-packages/numpy/tests/test_scripts.pyt   test_pep338/   s    (   t   __doc__t
   __future__R    R   R   R   R   t   pytestt   os.pathR   t   pathjoinR   R   R   t   numpyt   npt   numpy.compat.py3kR   t   numpy.testingR   R   t   __file__t
   is_inplaceR   t   markt   skipift   xfailt   parametrizeR!   R"   (    (    (    s7   lib/python2.7/site-packages/numpy/tests/test_scripts.pyt   <module>   s   !	'