o 6a%@sdZddlZddlZddlZddlmZmZmZddl Z ddl Z ddl m Z eeee jddZddZejjed d ejjd d ejd ed dZddZdS)z\ Test scripts Test that we can run executable scripts that have been installed with numpy. N)joinisfiledirname) assert_equalz..zsetup.pycCsttjdkr ttj}|drtj|dgStj|ddgStj}t |j }t |j }dd|d|d|gS)Nwin32Scriptsf2py.) sysplatformr executableendswithospathr version_infostrmajorminor)exe_dirversionrrr:/usr/lib/python3/dist-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$cCs,ttjddg}t|tjddS)Nz -mnumpy.f2pyrr) rrr r rrr r!r")r#rrr test_pep338,sr%)__doc__r rpytestos.pathrpathjoinrrrnumpyr numpy.testingr__file__ is_inplacermarkskipifxfail parametrizer$r%rrrrs