%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/test_popen.pyc |
ó Nêáac @ s d Z d d l Z d d l m Z d d l Z d d l Z e j Z d e j f d „ ƒ YZ d „ Z e d k r{ e ƒ n d S( sQ Basic tests for os.popen() Particularly useful for platforms that fake popen. iÿÿÿÿN( t test_supportt PopenTestc B s# e Z d „ Z d „ Z d „ Z RS( c C sM d t | f } t j | ƒ j ƒ d } t | ƒ d } | j | | ƒ d S( Ns$ %s -c "import sys;print sys.argv" %ss i ( t pythont ost popent readt evalt assertEqual( t selft cmdlinet expectedt cmdt datat got( ( s+ /usr/local/lib/python2.7/test/test_popen.pyt _do_test_commandline s c C si | j t t j ƒ | j d d d g ƒ | j d d d d g ƒ | j d d d d g ƒ t j ƒ d S( Ns foo bart foot bars foo "spam and eggs" "silly walk"s spam and eggss silly walks foo "a \"quoted\" arg" bars a "quoted" arg( t assertRaisest TypeErrorR R R R t reap_children( R ( ( s+ /usr/local/lib/python2.7/test/test_popen.pyt test_popen s c C ss | j t j d ƒ j ƒ d ƒ t j d k rP | j t j d ƒ j ƒ d ƒ n | j t j d ƒ j ƒ d ƒ d S( Ns exit 0t nts exit 42i* i i * ( R R R t closet Nonet name( R ( ( s+ /usr/local/lib/python2.7/test/test_popen.pyt test_return_code( s "( t __name__t __module__R R R ( ( ( s+ /usr/local/lib/python2.7/test/test_popen.pyR s c C s t j t ƒ d S( N( R t run_unittestR ( ( ( s+ /usr/local/lib/python2.7/test/test_popen.pyt test_main/ s t __main__( t __doc__t unittestt testR R t syst executableR t TestCaseR R R ( ( ( s+ /usr/local/lib/python2.7/test/test_popen.pyt <module> s