;
Μβ"Ic               @   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 k o d e d Z n Gd   d e j  Z	 d   Z
 e d	 k o e
   n d S(
   uQ   Basic tests for os.popen()

  Particularly useful for platforms that fake popen.
i    N(   u   supportu    u   "c             B   s    |  Ee  Z d    Z d   Z d S(   c             C   sU   d } | t  | f } t j |  j   } t |  d d   } |  j | |  d  S(   Nu&   %s -c "import sys; print(sys.argv)" %si   (   u   pythonu   osu   popenu   readu   evalu   assertEqual(   u   selfu   cmdlineu   expectedu   cmdu   datau   got(    (    u,   /mit/python/lib/python3.0/test/test_popen.pyu   _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(	   Nu   foo baru   foou   baru    foo "spam and eggs" "silly walk"u   spam and eggsu
   silly walku   foo "a \"quoted\" arg" baru   a "quoted" arg(   u   assertRaisesu	   TypeErroru   osu   popenu   _do_test_commandlineu   supportu   reap_children(   u   self(    (    u,   /mit/python/lib/python3.0/test/test_popen.pyu
   test_popen   s    N(   u   __name__u
   __module__u   _do_test_commandlineu
   test_popen(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/test/test_popen.pyu	   PopenTest   s   
	u	   PopenTestc               C   s   t  j t  d  S(   N(   u   supportu   run_unittestu	   PopenTest(    (    (    u,   /mit/python/lib/python3.0/test/test_popen.pyu	   test_main-   s    u   __main__(   u   __doc__u   unittestu   testu   supportu   osu   sysu
   executableu   pythonu   TestCaseu	   PopenTestu	   test_mainu   __name__(    (    (    u,   /mit/python/lib/python3.0/test/test_popen.pyu   <module>   s   		