-ν
θΆ<c       sΚ   d  k  Z  d  k Z d k l Z l Z d   Z d   Z d   Z d   Z 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 GHt  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 Xt d   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    sW   d GHt  i    } t i |   } | i |  t i   } | i |  t | 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Ο  d GHt  i    } | i d  | i d  | i   } | i   t | d d g j  | i d d d  t | i d  d g j  t | i	 d d d d d j d	  t | i
 d d   | i d d
 d  x3 d d d d
 f D] }  t | i
 d |   d  qη Wt | i d  d g j  t | i d  d g j  | i d d  t | i d  g  j  t  i    } t i d  } | i |  t | i d  d g j  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ω   d GHt  i    } t i |   } | i |  x7 t d d  D]& } t | i	 d d |  d j  q= Wx7 t d d  D]& } t | i	 d d |  d j  qw WxQ t d d  D]@ } y | i	 d d |  Wn t
 j
 o n Xt 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Γ   d GHt  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      si   d GHt  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     sτ   d GHt  i    } t | i   g  j d  t | i d  d  y | i d  Wn t  i j
 o	 }  n Xt d   y | i	 d d d  Wn t  i j
 o	 }  n Xt 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     sZ   d GHt  i    } | i d  y | i d  Wn t  i j
 o	 }  n Xt 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    sI   y |  i | | d | Wn | j
 o	 } n Xt 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    s[   t  i    } t i |  } y | i |  Wn |  j
 o	 } n Xt 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									



