3
���h� � @ s� d Z ddlZddlZddlZddlmZmZmZ ddl Z ddl
Zddlm
Z
eeeej�dd��Zdd� Zejjed d
�ejjdd
�ejjde� �d
d� ���Zdd� ZdS )z\ Test scripts
Test that we can run executable scripts that have been installed with numpy.
� N)�join�isfile�dirname)�assert_equalz..zsetup.pyc C sz t jdkrBtt j�} | jd�r.tjj| d�gS tjj| dd�gS n4t j}t |j
�}t |j�}dd| d| d | gS d S )N�win32�ScriptsZf2py�.)�sys�platformr �
executable�endswith�os�pathr �version_info�str�major�minor)�exe_dir�versionr r � r �9/tmp/pip-build-5_djhm0z/numpy/numpy/tests/test_scripts.py�find_f2py_commands s
r z Cannot test f2py command inplace)�reasonzTest is unreliable�f2py_cmdc C s t j| dg�}t|j� d� d S )Nz-v� 2)�
subprocess�check_outputr �strip)r �stdoutr r r � test_f2py# s r c C s$ t jtjddg�} t| j� d� d S )Nz-mnumpy.f2pyz-vr )r r r r r r )r r r r �test_pep338, s r )�__doc__r r
Zpytest�os.pathr Zpathjoinr r r Znumpy�npZ
numpy.testingr �__file__Z
is_inplacer �markZskipifZxfailZparametrizer r r r r r �<module> s |