Ñò
‘à"Ic           @   s    d  Z  d d k Z d d k l Z d d k Z d d k Z e i Z d e j o d e d Z n d e i f d „  ƒ  YZ	 d „  Z
 e d	 j o e
 ƒ  n d S(
   sQ   Basic tests for os.popen()

  Particularly useful for platforms that fake popen.
iÿÿÿÿN(   t   test_supportt    t   "t	   PopenTestc           B   s   e  Z d  „  Z d „  Z RS(   c         C   sI   d t  | f } t i | ƒ i ƒ  } t | ƒ d } |  i | | ƒ d  S(   Ns$   %s -c "import sys;print sys.argv" %si   (   t   pythont   ost   popent   readt   evalt   assertEqual(   t   selft   cmdlinet   expectedt   cmdt   datat   got(    (    s,   /mit/python/lib/python2.6/test/test_popen.pyt   _do_test_commandline   s    c         C   si   |  i  t t i ƒ |  i d d d g ƒ |  i d d d d g ƒ |  i d d d d g ƒ t i ƒ  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,   /mit/python/lib/python2.6/test/test_popen.pyt
   test_popen   s    (   t   __name__t
   __module__R   R   (    (    (    s,   /mit/python/lib/python2.6/test/test_popen.pyR      s   	c           C   s   t  i t ƒ d  S(   N(   R    t   run_unittestR   (    (    (    s,   /mit/python/lib/python2.6/test/test_popen.pyt	   test_main+   s    t   __main__(   t   __doc__t   unittestt   testR    R   t   syst
   executableR   t   TestCaseR   R   R   (    (    (    s,   /mit/python/lib/python2.6/test/test_popen.pyt   <module>   s   		