-ν
θΆ<c       s     d  k  Z   d  k Z  d k l Z l Z  d   Z 7 d   Z G d   Z e d   Z x d   Z	  d   Z
  d   Z ― d	   Z » d
 d  Z Δ d   Z Ο e d  ΰ e d  ζ e   η e d  ω e	 d  e
   e   e   d  S(   N(   s
   TestFaileds   verifyc    sδ    d GH	 t  i    } 
 t i |   }  | i |   | i   }  | i    t	 | d d d d d d g j  d   t	 | i
 d d	 d
 d d j   t	 | i
 d d	 d
 d d j   t	 | i
 d d	 d
 d d j   t	 d | i d  j  d  # t	 | i d d	  $ d  % t	 | i d d	  & d  ' t	 | i d d	  ( d  * y + | i d d	  Wn , t  i j
 o
 - n X/ t d   3 t	 | i
 d d	 d
 d d j  d  S(   Ns   Testing basic accessors...s   Commented Bars   Foo Bars   Internationalized Stuffs	   Long Lines   Section\with$weird%characters[	s
   Spacey Bars    unexpected list of section namess   foos   rawi   s   bars   __name__s3   __name__ "option" should not be exposed by the API!s4   remove_option() failed to report existance of options'   remove_option() failed to remove optionsI   remove_option() failed to report non-existance of option that was removeds   No Such SectionsK   remove_option() failed to report non-existance of option that never existeds7   this line is much, much longer than my editor
likes it.(   s   ConfigParsers   cfs   StringIOs   srcs   sios   readfps   sectionss   Ls   sorts   verifys   gets   optionss   remove_options
   has_options   NoSectionErrors
   TestFailed(   s   srcs   sios   cfs   L(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   basic s2   !
%%%



c    sr   7 8 d GH9 t  i    } : t i |   } ; | i |  < t i   } = | i |  > t | E d  d  S(   Ns   Testing writing of files...s   [DEFAULT]
foo = another very
        long line

[Long Line]
foo = this line is much, much longer than my editor
        likes it.
(	   s   ConfigParsers   cfs   StringIOs   srcs   sios   readfps   outputs   writes   verify(   s   srcs   outputs   sios   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   write7 s   	c     s   G H d GHI t  i    } J | i d  K | i d  L | i   } M | i   N t | d d g j  O | i d d d  P t | i d  d g j  Q t | i	 d d d d d j R d	  S t | i
 d d   T | i d d
 d  U x< d d d d
 f DU ]% }  V t | i
 d |   W d  qWX t | i d  d g j  Y t | i d  d g j  Z | i d d  [ t | i d  g  j  ^ t  i    } _ t i d  } ` | i |  a t | i d  d g j  b t | i	 d d  d j  d  S(   Ns   Testing case sensitivity...s   As   as   Bs   values   bs   rawi   s@   could not locate option, expecting case-insensitive option namess   A-Bs	   A-B values   a-bs   A-bs   a-Bs9   has_option() returned false for option which should exists,   [MySection]
Option: first line
	second line
s	   MySections   options   Options   first line
second line(   s   ConfigParsers   cfs   add_sections   sectionss   Ls   sorts   verifys   sets   optionss   gets
   has_options   opts   remove_options   StringIOs   sios   readfp(   s   opts   sios   cfs   L(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   case_sensitivityG s4   !
 	c    s/  e f d GHg t  i    } h t i |   } i | i |  j x= t d d  Dj ]) } k t | i	 d d |  d j  qO Wl x= t d d  Dl ]) } m t | i	 d d |  d j  q Wn xc t d d  Dn ]O } o y p | i	 d d |  Wn q t
 j
 o
 r n Xt t d	   qΥ Wd  S(
   Ns+   Testing interpretation of boolean Values...i   i   s   BOOLTESTs   t%ds   f%di    s   e%ds1   getboolean() failed to report a non boolean value(   s   ConfigParsers   cfs   StringIOs   srcs   sios   readfps   ranges   xs   verifys
   getbooleans
   ValueErrors
   TestFailed(   s   srcs   xs   sios   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   booleane s"    	' 	' 	c    sα   x y d GHz t  i  h  d d < } { t i |   } | | i |  } t | i d d  d j  ~ t | i d d  d j   t | i d d  d j   t | i d d	  d
 j   t | t  i	 d d  d  S(   Ns   Testing value interpolation...s   %(__name__)ss   getnames   Foos   bars%   something with interpolation (1 step)s   bar9s.   something with lots of interpolation (9 steps)s   bar10s/   something with lots of interpolation (10 steps)s   bar11(
   s   ConfigParsers   cfs   StringIOs   srcs   sios   readfps   verifys   gets   expect_get_errors   InterpolationDepthError(   s   srcs   sios   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   interpolationx s   c      s     d GH t  t i  d   t  t i  d   t  t i  d   t  t i  d   t  t i  d   t  t i  d  d  S(   Ns   Testing parse errors...s   [Foo]
  extra-spaces: splat
s   [Foo]
  extra-spaces= splat
s   [Foo]
option-without-value
s!   [Foo]
:value-without-option-name
s!   [Foo]
=value-without-option-name
s   No Section!
(   s   expect_parse_errors   ConfigParsers   ParsingErrors   MissingSectionHeaderError(    (    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   parse_errors s   




c     s0    d GH t  i    }  t | i   g  j  d   t | i d   d   y  | i d  Wn  t  i j
 o }    n X’ t d   € y ₯ | i	 d d d  Wn ¦ t  i j
 o }  § n X© t d	   ͺ t
 | t  i d d  « | i d  ¬ t
 | t  i d d  d  S(
   Ns   Testing query interface...s0   new ConfigParser should have no defined sectionss   Foos5   new ConfigParser should have no acknowledged sectionss6   Failed to catch expected NoSectionError from options()s   foos   bars   values2   Failed to catch expected NoSectionError from set()(   s   ConfigParsers   cfs   verifys   sectionss   has_sections   optionss   NoSectionErrors   es
   TestFaileds   sets   expect_get_errors   add_sections   NoOptionError(   s   es   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   query_errors s&   

c     su   ― ° d GH± t  i    } ² | i d  ³ y ΄ | i d  Wn ΅ t  i j
 o }  Ά n XΈ t d   d  S(   Ns)   Testing miscellaneous error conditions...s   Foos.   Failed to catch expected DuplicateSectionError(   s   ConfigParsers   cfs   add_sections   DuplicateSectionErrors   es
   TestFailed(   s   es   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   weird_errors― s   i    c    s[   » Ό y ½ |  i | | d | Wn Ύ | j
 o } Ώ n XΑ t d | i   d  S(   Ns   raws   Failed to catch expected (	   s   cfs   gets   sections   options   raws   exctypes   es
   TestFaileds   __name__(   s   cfs   exctypes   sections   options   raws   e(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   expect_get_error» s
   c    ss   Δ Ε t  i    } Ζ t i |  } Η y Θ | i |  Wn Ι |  j
 o } Κ n XΜ t d |  i	   d  S(   Ns   Failed to catch expected (
   s   ConfigParsers   cfs   StringIOs   srcs   sios   readfps   exctypes   es
   TestFaileds   __name__(   s   exctypes   srcs   es   sios   cf(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   expect_parse_errorΔ s   s  
[Foo Bar]
foo=bar
[Spacey Bar]
foo = bar
[Commented Bar]
foo: bar ; comment
[Long Line]
foo: this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]: Bulgarian
foo=Default
foo[en]=English
foo[de]=Deutsch
sr   [Long Line]
foo: this line is much, much longer than my editor
   likes it.
[DEFAULT]
foo: another very
 long lines}   
[BOOLTEST]
T1=1
T2=TRUE
T3=True
T4=oN
T5=yes
F1=0
F2=FALSE
F3=False
F4=oFF
F5=nO
E1=2
E2=foo
E3=-1
E4=0.1
E5=FALSE AND MORE
sΑ  
[Foo]
bar=something %(with1)s interpolation (1 step)
bar9=something %(with9)s lots of interpolation (9 steps)
bar10=something %(with10)s lots of interpolation (10 steps)
bar11=something %(with11)s lots of interpolation (11 steps)
with11=%(with10)s
with10=%(with9)s
with9=%(with8)s
with8=%(with7)s
with7=%(with6)s
with6=%(with5)s
with5=%(with4)s
with4=%(with3)s
with3=%(with2)s
with2=%(with1)s
with1=with

[Mutual Recursion]
foo=%(bar)s
bar=%(foo)s
(   s   ConfigParsers   StringIOs   test_supports
   TestFaileds   verifys   basics   writes   case_sensitivitys   booleans   interpolations   parse_errorss   query_errorss   weird_errorss   expect_get_errors   expect_parse_error(   s   case_sensitivitys   StringIOs   verifys   parse_errorss   weird_errorss   writes   booleans   expect_get_errors   basics
   TestFaileds   query_errorss   ConfigParsers   expect_parse_errors   interpolation(    (    s)   /usr/lib/python2.2/test/test_cfgparser.pys   ? s(   0	


