mς
­fIc           @   s~   d  k  Z  d  k Z d  k Z d  k Z d k l Z d Z e i Z d e i	 f d     YZ
 d   Z e d j o e   n d  S(   N(   s   test_supports   
machine foo login log1 password pass1 account acct1

macdef macro1
line1
line2

macdef macro2
line3
line4

default login log2 password pass2

t   NetrcTestCasec           B   s#   t  Z d   Z d   Z d   Z RS(   Nc         C   sc   d } t i d g j o | d 7} n t t |  } | i t  | i   t	 i	 t  |  _	 d  S(   Nt   wt   cygwint   t(   t   modet   syst   platformt   opent   temp_filenamet   fpt   writet
   TEST_NETRCt   closet   netrct   self(   R   R	   R   (    (    t,   /mit/python/lib/python2.4/test/test_netrc.pyt   setUp   s    
c         C   s   |  ` t i t  d  S(   N(   R   R   t   ost   unlinkR   (   R   (    (    R   t   tearDown!   s    c         C   su   |  i |  i i h  d d d g <d d d g <j  |  i |  i i d d j  |  i |  i i d d j  d  S(   Nt   macro1s   line1
s   line2
t   macro2s   line3
s   line4
t   foot   log1t   acct1t   pass1t   defaultt   log2t   pass2(   R   R   R   (   R   NR   (   R   t   assert_R   t   macrost   hostst   None(   R   (    (    R   t   test_case_1%   s    7(   t   __name__t
   __module__R   R   R!   (    (    (    R   R       s   			c           C   s   t  i t  d  S(   N(   t   test_supportt   run_unittestR    (    (    (    R   t	   test_main,   s    t   __main__(   R   R   t   unittestR   t   testR$   R   t   TESTFNR   t   TestCaseR    R&   R"   (	   R$   R    R(   R   R   R   R   R&   R   (    (    R   t   ?   s   $		