a :jgm@sdZddlZddlZddlZddlmZmZmZddl Z ddl Z ddl m Z mZeeee jddZddZejjed d ejjd d ejd ed dZejjedd ddZdS)z\ Test scripts Test that we can run executable scripts that have been installed with numpy. N)joinisfiledirname) assert_equalIS_WASMz..zsetup.pycCsztjdkrBttj}|dr.tj|dgStj|ddgSn4tj}t |j }t |j }dd|d|d|gSdS)Nwin32ScriptsZf2py.) sysplatformr executableendswithospathr version_infostrmajorminor)exe_dirversionrrrB/usr/local/lib/python3.9/site-packages/numpy/tests/test_scripts.pyfind_f2py_commandss     rz Cannot test f2py command inplace)reasonzTest is unreliablef2py_cmdcCs(t|dg}t|tjddS)N-vascii) subprocess check_outputrstripnp __version__encode)rstdoutrrr test_f2py#sr$zCannot start subprocesscCs,ttjddg}t|tjddS)Nz -mnumpy.f2pyrr) rrr r rrr r!r")r#rrr test_pep338,sr%)__doc__r rZpytestos.pathrZpathjoinrrrnumpyr Z numpy.testingrr__file__Z is_inplacermarkZskipifZxfailZ parametrizer$r%rrrrs