3
ßL]e  ã               @   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	d
„ Zejjedd�ejjdd�ejjdeƒ ƒdd„ ƒƒƒZdd„ ZdS )z\ Test scripts

Test that we can run executable scripts that have been installed with numpy.
é    )ÚdivisionÚprint_functionÚabsolute_importN)ÚjoinÚisfileÚdirname)Ú
basestring)Úassert_Úassert_equalz..zsetup.pyc              C   sz   t jdkrBtt jƒ} | jdƒr.tjj| dƒgS tjj| ddƒgS n4t j}t	|j
ƒ}t	|jƒ}dd| d| d | gS d S )NÚwin32ÚScriptsZf2pyÚ.)ÚsysÚplatformr   Ú
executableÚendswithÚosÚpathr   Úversion_infoÚstrÚmajorÚminor)Zexe_dirÚversionr   r   © r   ú;/tmp/pip-install-q_7g0qgj/Numpy/numpy/tests/test_scripts.pyÚfind_f2py_commands   s    




r   z Cannot test f2py command inplace)ÚreasonzTest is unreliableÚf2py_cmdc             C   s    t j| dgƒ}t|jƒ dƒ d S )Nz-vó   2)Ú
subprocessÚcheck_outputr
   Ústrip)r   Ústdoutr   r   r   Ú	test_f2py&   s    r#   c              C   s$   t jtjddgƒ} t| jƒ dƒ d S )Nz-mnumpy.f2pyz-vr   )r   r    r   r   r
   r!   )r"   r   r   r   Útest_pep338/   s    r$   )Ú__doc__Ú
__future__r   r   r   r   r   ZpytestÚos.pathr   Zpathjoinr   r   r   ZnumpyÚnpZnumpy.compat.py3kr   Znumpy.testingr	   r
   Ú__file__Z
is_inplacer   ÚmarkZskipifZxfailZparametrizer#   r$   r   r   r   r   Ú<module>   s   