Current File : //usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyc |
�
E�`Qc @ s� d d l Z d d l Z d d l Z d d l m Z d d l m Z d � Z d e f d � � YZ d e f d � � YZ
d e f d
� � YZ d � Z d � Z
d S(
i����N( t
TemporaryFile( t exec_commandc O s6 | j � z | | | � Wd | j d d d � Xd S( N( t __enter__t __exit__t None( t contextt ft argst kwargs( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyt fake_with s
t redirect_stdoutc B s, e Z d Z d d � Z d � Z d � Z RS( s9 Context manager to redirect stdout for exec_command test.c C s | p t j | _ d S( N( t syst stdoutt _stdout( t selfR ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyt __init__ s c C s t j | _ | j t _ d S( N( R R t
old_stdoutR
( R ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR s c C s* | j j � | j t _ | j j � d S( N( R
t flushR R R t close( R t exc_typet exc_valuet traceback( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR s
N( t __name__t
__module__t __doc__R R R R ( ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR
s t redirect_stderrc B s, e Z d Z d d � Z d � Z d � Z RS( s9 Context manager to redirect stderr for exec_command test.c C s | p t j | _ d S( N( R t stderrt _stderr( R R ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR ! s c C s t j | _ | j t _ d S( N( R R t
old_stderrR ( R ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR $ s c C s* | j j � | j t _ | j j � d S( N( R R R R R R ( R R R R ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR ( s
N( R R R R R R R ( ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR s t emulate_nonposixc B s, e Z d Z d d � Z d � Z d � Z RS( s. Context manager to emulate os.name != 'posix' s non-posixc C s
| | _ d S( N( t _new_name( R t osname( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR 0 s c C s t j | _ | j t _ d S( N( t ost namet _old_nameR ( R ( ( sM /usr/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR 3 s c C s | j t _ d S( N( R"