/opt/alt/python27/lib64/python2.7/site-packages/numpy/tests
Edit: /opt/alt/python27/lib64/python2.7/site-packages/numpy/tests/test_scripts.pyc (3442B)
ó
]9Zc @` s
d Z d d l m Z m Z m Z d d l Z d d l m Z m Z m
Z
m Z d d l Z d d l
m Z m Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m Z e e e
e j d
d Z e d Z e e 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 dirnamet basename( t Popent PIPE( t
basestringt asbytes( t assert_equal( t skipif( t assert_s ..s setup.pyc
C` s t | t r | g n t | } t j d k rj g | D]' } d | k r[ d j | n | ^ q: } n t | d t d t } | j \ } } | j d
k r³ | j n | r| j d k rt
d j d d d d
d d d d g j | | | n | j | | f S( sp Run command sequence `cmd` returning exit code, stdout, stderr
Parameters
----------
cmd : str or sequence
string with command name or sequence of strings defining command
check_code : {True, False}, optional
If True, raise error for non-zero return code
Returns
-------
returncode : int
return code from execution of `cmd`
stdout : bytes (python 3) or str (python 2)
stdout from `cmd`
stderr : bytes (python 3) or str (python 2)
stderr from `cmd`
Raises
------
RuntimeError
If `check_code` is True, and return code !=0
t ntt s "{0}"t stdoutt stderri s
s Command "{0}" failed withs ------s {1}t s {2}N( t
isinstanceR t listt ost namet formatR R t communicatet pollt Nonet terminatet
returncodet RuntimeErrorR ( t cmdt
check_codet ct procR R ( ( sK /opt/alt/python27/lib64/python2.7/site-packages/numpy/tests/test_scripts.pyt run_command s $7
'c C` sP t j d k r t t j } | j d r: d | } n
d | } t t j | d g \ } } } | j t d k } t | d nż t j } t
| d } t
| d } d
d
| d
| d | f } t } xW | D]O } y? t | d g \ } } } t | j t d t
} PWqâ qâ Xqâ Wd | }
t | |
d S(
Nt win32t Scriptss
%s\f2py.pys %s\Scripts\f2py.pys -vt 2s Warning: f2py not found in pathi i t f2pyt .s/ Warning: neither %s nor %s nor %s found in path( t syst platformR t
executablet endswithR" t stripR
R
t version_infot strt FalseR t True( t exe_dirt f2py_cmdt codeR R t successt versiont majort minort f2py_cmdst msg( ( sK /opt/alt/python27/lib64/python2.7/site-packages/numpy/tests/test_scripts.pyt test_f2py= s.
!
( t __doc__t
__future__R R R R t os.pathR t pathjoinR R R R( t
subprocessR R t numpyt npt numpy.compat.py3kR R
t
nose.toolsR t numpy.testing.decoratorsR t
numpy.testingR
t __file__t
is_inplaceR0 R" R: ( ( ( sK /opt/alt/python27/lib64/python2.7/site-packages/numpy/tests/test_scripts.pyt
s "!*