
    /hh\                    N   S SK r S SKrS SKrS SKrS SKrS SKrS SKJr  S SKJ	r	   " S S\ R                  5      r " S S5      r " S S	\5      r " S
 S\\R                  5      r " S S\\R                  5      r " S S\\R                  5      r " S S\R                  5      r " S S\5      r " S S\5      r " S S\\R                  5      r " S S\\R                  5      r " S S\5      r " S S\\R                  5      r " S S\\R                  5      r " S  S!\5      r " S" S#\5      r " S$ S%\\R                  5      r " S& S'\\R                  5      r " S( S)\\R                  5      r " S* S+\R                  5      r " S, S-\5      r  " S. S/\\R                  5      r! " S0 S1\\R                  5      r" " S2 S35      r#S4 r$ " S5 S6\R                  5      r% " S7 S8\R                  5      r& " S9 S:\R                  5      r' " S; S<\R                  5      r( " S= S>\R                  5      r) " S? S@\\R                  5      r* " SA SB\R                  5      r+ " SC SD\R                  5      r, " SE SF\R                  5      r-\.SG:X  a  \R^                  " 5         gg)H    N)support)	os_helperc                   <    \ rS rSrS rS rS rS rS rS r	\r
Srg	)

SortedDict   c                 H    [        U R                  R                  5       5      $ N)sorteddataitemsselfs    ?/opt/python-3.13.8/usr/lib/python3.13/test/test_configparser.pyr   SortedDict.items   s    diioo'((    c                 H    [        U R                  R                  5       5      $ r	   )r
   r   keysr   s    r   r   SortedDict.keys   s    diinn&''r   c                 R    U R                  5        Vs/ s H  oS   PM	     sn$ s  snf )N   )r   )r   is     r   valuesSortedDict.values   s"    "jjl+l!l+++s   $c                 4    [        U R                  5       5      $ r	   )iterr   r   s    r   	iteritemsSortedDict.iteritems   s    DJJL!!r   c                 4    [        U R                  5       5      $ r	   )r   r   r   s    r   iterkeysSortedDict.iterkeys   s    DIIK  r   c                 4    [        U R                  5       5      $ r	   )r   r   r   s    r   
itervaluesSortedDict.itervalues   s    DKKM""r    N)__name__
__module____qualname____firstlineno__r   r   r   r   r   r"   __iter____static_attributes__r$   r   r   r   r      s'    )(,"!# Hr   r   c                       \ rS rSrSrSrSrSrSr\	R                  rSr\	R                  r\	R                  rS
S jrS
S jrS	rg)CfgParserTestCaseClass#   F)=:);#TNc                    [        UU R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  S9
nU R                  " S0 UD6nU$ )N)
defaultsallow_no_value
delimiterscomment_prefixesinline_comment_prefixesempty_lines_in_values	dict_typestrictdefault_sectioninterpolationr$   )dictr4   r5   r6   r7   r8   r9   r:   r;   r<   config_class)r   r3   	argumentsinstances       r   	newconfig CfgParserTestCaseClass.newconfig.   st    ..!22$($@$@"&"<"<nn;; 00,,
	 $$1y1r   c                 J    U R                  U5      nUR                  U5        U$ r	   )rA   read_string)r   stringr3   cfs       r   
fromstring!CfgParserTestCaseClass.fromstring>   s!    ^^H%
v	r   r$   r	   )r%   r&   r'   r(   r4   r5   r6   r7   r8   configparser_default_dictr9   r:   DEFAULTSECTr;   _UNSETr<   rA   rG   r*   r$   r   r   r,   r,   #   sN    NJ!( **IF"..O ''M r   r,   c                       \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSrg)BasicTestCaseD   c                 N!   / SQnU R                   (       a  UR                  S5        UR                  5         SS/nUR                  5       nUR                  5         U R                  nU" XB5        UR                  S5      nUR                  5         U" XC5        U Vs/ s H  ofPM     nnUR                  5         UR                  U R                  5        UR                  5         U" XB5        US   R                  5       n[        [        U5      5      nU" XC5        UR                  5       n[        [        U5      5      nU R	                  [        U5      [        U5      5        U H  u  pvU" XvR                  5        M     U" UR                  5       XR                     5        U" UR                  SS5      S5        U" UR                  S	S5      S
5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U R                  UR                  SS5      S5        U" UR                  SS5      S5        U" UR!                  SS5      S5        U" UR                  SS5      S5        U" UR                  S S!5      S"5        U R                   (       a  U" UR                  SS#5      S 5        U" UR                  SSSS$9S5        U" UR                  SSSS0S%9S5        U R#                  [$        R&                  5         UR                  S&S5        S S S 5        U R#                  [$        R(                  5         UR                  SS'5        S S S 5        U" UR                  S&SSS$9S5        U" UR                  SS'SS$9S5        U" UR                  S	SS S$9S
5        U" UR                  S(SS S$9S 5        U" UR                  SSS)S$9S5        U" UR                  SS*S)S$9S)5        U" UR                  SS*S+S$9S+5        U R#                  [$        R(                  5         UR                  SS*5        S S S 5        U R                  UR                  SSS,S$9S5        U R                  UR                  SS-S,S$9S,5        U" UR                  SS-S.S$9S.5        U R#                  [$        R(                  5         UR                  SS-5        S S S 5        U" UR!                  SSS/S$9S5        U" UR!                  SS0S1S$9S15        U" UR!                  SS0S/S$9S/5        U R#                  [$        R(                  5         UR!                  SS05        S S S 5        U" UR!                  S2SS/S$9S/5        U R                   (       a0  U" UR                  SS#SS$9S 5        U" UR                  SS3SS$9S5        U" US   S   S5        U" US	   S   S
5        US   nU" UR                  S5        U R+                  UR,                  U5        U R#                  [.        5         S4Ul
        S S S 5        U R#                  [.        5         S5Ul        S S S 5        U" US   S5        U" US   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US6   S   S75        U R                   (       a  U" US   S#   S 5        U" US   R                  SS5      S5        U" US   R                  SSS$9S5        U" US   R                  SSS0S%9S5        U R#                  [0        5         US&   S     S S S 5        U R#                  [0        5         US   S'     S S S 5        U R#                  [0        5         US&   R                  SSS$9  S S S 5        U" US   R                  S'S5      S5        U" US   R                  S'SS$9S5        U" US   R                  S'5      S 5        U" US	   R                  SS 5      S
5        U" US	   R                  SS S$9S
5        U R#                  [0        5         US(   R                  SS 5        S S S 5        U" US   R                  SS)5      S5        U" US   R                  SS)S$9S5        U" US   R                  S*S)5      S)5        U" US   R                  S*S)S$9S)5        U" US   R                  S*S+5      S+5        U" US   R                  S*S+S$9S+5        U" US   R                  S*5      S 5        U R                  US   R                  SS,5      S5        U R                  US   R                  SS,S$9S5        U R                  US   R                  S-S,5      S,5        U R                  US   R                  S-S,S$9S,5        U" US   R                  S-S.5      S.5        U" US   R                  S-S.S$9S.5        U" US   R                  S-5      S 5        U" US   R!                  SS/5      S5        U" US   R!                  SS/S$9S5        U" US   R!                  S0S15      S15        U" US   R!                  S0S1S$9S15        U" US   R!                  S0S/5      S/5        U" US   R!                  S0S/S$9S/5        U" US   R!                  S05      S 5        U R                   (       al  U" US   R                  S#S5      S 5        U" US   R                  S#SS$9S 5        U" US   R                  S3S5      S5        U" US   R                  S3SS$9S5        S8XR                     S9'   S:XR                     S;'   U R3                  UR5                  S5      5        U R7                  UR9                  SS5      5        U R7                  UR5                  S5      5        U R7                  UR5                  U R                  5      5        U R3                  UR;                  SS5      S<5        U R7                  UR9                  SS5      S=5        U R7                  UR;                  SS5      S>5        U R3                  UR9                  SS95      5        U R7                  UR;                  SS95      5        U R3                  UR;                  U R                  S95      5        U R7                  UR9                  SS95      5        U R7                  UR;                  U R                  S95      5        U R#                  [$        R&                  5       nUR;                  S?S5        S S S 5        U R	                  WR<                  R>                  S@5        U" UR                  S6S5      S75        US	 U R7                  SU;   5        U R#                  [0        5         US	 S S S 5        U R#                  [@        5         XR                  	 S S S 5        US	   S	 U R7                  SUS	   ;   5        U R#                  [0        5         US	   S	 S S S 5        U R3                  S;US	   ;   5        U R#                  [0        5         US	   S;	 S S S 5        XR                     S;	 U R7                  S;US	   ;   5        U R#                  [0        5         XR                     S;	 S S S 5        U R#                  [0        5         US?   S	 S S S 5        g s  snf ! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       G
N= f! , (       d  f       G
N@= f! , (       d  f       G	N= f! , (       d  f       G	N= f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GN;= f! , (       d  f       GNo= f! , (       d  f       GN
= f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GNY= f! , (       d  f       g = f)AN)
Commented BarFoo BarInternationalized Stuff	Long LineSection\with$weird%characters[	Spaces
Spacey BarSpacey Bar From The BeginningTypesThis One Has A ] In ItNoValue)bazqwe)foobar3rX   rR   r^   bar1rW   bar2r_   r\   r]   rQ   bar4rV   key with spacesvalueanother with spacessplat!rY   int*   42float)\(?z0.44booleanF123strange but acceptablerZ   forksspoonsoption-without-valuefallbackvarszNo Such Foo Barzno-such-foozNo Such Spacey Bar   zno-such-int18g        zno-such-floatz0.0Tzno-such-booleanyeszNo Such Typeszno-such-option-without-valuezName is read-onlyzParser is read-onlyrT   7this line is much, much longer than my editor
likes it.1
this_value2
that_valuez4remove_option() failed to report existence of optionz'remove_option() failed to remove optionzIremove_option() failed to report non-existence of option that was removedNo Such Section)r~   )!r4   appendsortsectionsassertEqualr   r;   r
   listlennamer3   getgetintassertAlmostEqualgetfloat
getbooleanassertRaisesrI   NoSectionErrorNoOptionErrorassertIsparserAttributeErrorKeyError
assertTrueremove_sectionassertFalse
has_optionremove_option	exceptionargs
ValueError)	r   rF   EFLeqsectionr   cms	            r   
basic_testBasicTestCase.basic_testF   s   
 HHY	_- KKM	
1HH45	
1 %''BWB'		%%&	
1./55747O
1HHJ47OQQ(MDt\\" 
2;;="1123 	266)U#V,
266,&/
2661596B
2661595A
266/5)62
266/5)51
266(-.8
266(12H=
299We$b)
266'5!4(r{{7G<dC
266'7#V,
2==),e4
266'5!#;<
266*G4h?rvvi!78$? 	266)UU63V<
266)U%68%@|::;FF$e, <|99:FF9m, ;
266#UU6;UC
266)]U6;UC
266,65v>
266&6=tD
299Web9126
299Wmb992>
299Wmd9;TB|99:IIg}- ;r{{7G47  +  9:>	@r{{7O47  +  9:=	?
2;;w%;@%H|99:KK1 ;
2==)d=;UC
2=="3e=D	
2=="3d=CTJ|99:MM'#45 ;
2==)d=CTJrvvi!7%vH$Orvvi!?$  &',. 	2i=(
2lE"F+45
7<<89gnnb)~..GL /~.2GN /
75>6"
75>5!
2ou%v.
2ou%u-
2h<)*G4
2h<-.9
2k?5!E	Gr)}34d;
2i=UE*F3
2i=UU3V<
2i=U%8%@x( !%( )x(yM-( )x( !%%ee%< )
2i=]E2E:
2i=]U;UC
2i=]+T2
2lt,f5
2l5v>x(#$((5 )
2g;eR("-
2g;eb126
2g;mR0"5
2g;mb92>
2g;mT2D9
2g;md;TB
2g;m,d3r'{33GSA4Hr'{33G=@  4  BCG	Ir'{33OSI3Or'{33O=@  4  BCF	H
2g;7?
2g;%@%H
2g;0$7
2g;!!)T2E:
2g;!!)d!;UC
2g;!!"3U;UC
2g;!!"3e!D	
2g;!!"3T:DA
2g;!!"3d!CTJ
2g;!!"34d;r)}  !7?Fr)}  !7% H$Or)}  !?GOr)}  !?$ ! &',. 25 .14 . 	))(34x1BCD**845**4+?+?@A((E:N	Py%8=	?)))U;(	) 	i>?)))\BC(()=)=|LMy,?@))$*>*>MN|::;r.6 <**,@A
266+u%E	G wKB'x(7 )z*''( +|U#"\"223x(< ' )<(889x(< . )##$\2L)99:x(''(6 )x($%e, )(} (R <;:: ;: ;: ;: /...  )((((( )(r <; )(** )( )( )(((s   }}$}6:~~~,+~>
	"0	4A@A@/A@*5A@<AAAA AA2"ABAB$
}36
~
~
~),
~;>

"
14
A@@
A@@
A@'@*
A@9@<
AAA
AAA 
AA/A2
ABB
ABB
AB$c                    SR                  U R                  U R                  5      nU R                  (       a  US-  nU R	                  U5      nU R                  U5        U R                  (       a  U R                  [        R                  5         UR                  [        R                  " SR                  U R                  5      5      5        S S S 5        U R                  [        R                  5         UR                  [        R                  " SR                  U R                  5      5      5        S S S 5        g UR                  [        R                  " SR                  U R                  5      5      5        UR                  [        R                  " SR                  U R                  5      5      5        g ! , (       d  f       N= f! , (       d  f       g = f)Nax  [Foo Bar]
foo{0[0]}bar1
[Spacey Bar]
foo {0[0]} bar2
[Spacey Bar From The Beginning]
  foo {0[0]} bar3
  baz {0[0]} qwe
[Commented Bar]
foo{0[1]} bar4 {1[1]} comment
baz{0[0]}qwe {1[0]}another one
[Long Line]
foo{0[1]} this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]{0[1]} Bulgarian
foo{0[0]}Default
foo[en]{0[0]}English
foo[de]{0[0]}Deutsch
[Spaces]
key with spaces {0[1]} value
another with spaces {0[0]} splat!
[Types]
int {0[1]} 42
float {0[0]} 0.44
boolean {0[0]} NO
123 {0[1]} strange but acceptable
[This One Has A ] In It]
  forks {0[0]} spoons
z[NoValue]
option-without-value
z                    [Duplicate Options Here]
                    option {0[0]} with a value
                    option {0[1]} with another value
                z                    [And Now For Something]
                    completely different {0[0]} True
                    [And Now For Something]
                    the larch {0[1]} 1
                z                [Duplicate Options Here]
                option {0[0]} with a value
                option {0[1]} with another value
            z                [And Now For Something]
                completely different {0[0]} True
                [And Now For Something]
                the larch {0[1]} 1
            )formatr5   r6   r4   rG   r   r:   r   rI   DuplicateOptionErrorrD   textwrapdedentDuplicateSectionErrorr   config_stringrF   s      r   
test_basicBasicTestCase.test_basic&  sb   < F4??D112= 	> )M __]+;;""<#D#DEx 0 F4??+	 - . F ""<#E#EFx 0
 F4??+ - . GF NN8?? , t'	) * NN8?? ,
 t') *) FE GFs   ?F:5?G:
G
Gc                    SS0SS0SSS.SSS.SS00 S	S
SSS.SSS.SSSSS.SS0S.
nU R                   (       a  UR                  SSS 005        U R                  5       nUR                  U5        U R	                  U5        U R
                  (       a  U R                  [        R                  5         UR                  SS0SS0S.5        S S S 5        U R                  [        R                  5         UR                  SS S!S".05        S S S 5        g UR                  SS0SS0S#.5        UR                  SS S!S".05        g ! , (       d  f       N|= f! , (       d  f       g = f)$Nr^   r`   ra   r_   r]   )r^   r\   rb   ry   	BulgarianDefaultEnglishDeutsch)zfoo[bg]r^   zfoo[en]zfoo[de]rd   rf   )rc   re   rh   rk   Frn   )rg   rj   rl   {   ro   rp   )
rR   rW   rX   rQ   rT   rU   rS   rV   rY   rZ   r[   rq   keykey2value2)rz   r   zDuplicate Options Herezwith a valuezwith another value)optionOPTION)r   SECTION)
r4   updaterA   	read_dictr   r:   r   rI   r   r   r   configrF   s      r   test_basic_from_dict"BasicTestCase.test_basic_from_dicti  s    v v .
 
  2 ' $$	( $+'/
  -	 'K(
R MM*D 
 ^^
V;;""<#E#EF))  G
 ""<#D#DE,"0"6/  FE LL!7+"H-  LL(,2+ # GF
 FEs   1E 1E 
E
Ec                 2   U R                  5       nUR                  S5        UR                  S5        UR                  S5        UR                  5       nUR                  5         U R                  nU" U/ SQ5        UR                  SSS5        U" UR                  S5      S/5        U" UR                  SS5      SS5        U R                  [        R                  5         UR                  SSS5        S S S 5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        UR                  SSS	5        S
 H%  nU R                  UR                  SU5      S5        M'     U" UR                  S5      S/5        U" UR                  S5      S/5        UR                  SS5        U" UR                  S5      / 5        U R                  SR!                  U R"                  S   5      5      nU" UR                  S5      S/5        U" UR                  SS5      S5        U R                  SR!                  U R"                  S   5      SS0S9nU R                  UR                  SS5      5        g ! , (       d  f       GN= f)NAaB)r   r   r   rd   b@could not locate option, expecting case-insensitive option namesA-B	A-B valuea-bzA-bza-Br   9has_option() returned false for option which should existr   3[MySection]
Option{} first line   
	second line   
r   	MySectionr   Optionfirst line
second line[section]
nekey{}nevalue
r   r3   r   Key)rA   add_sectionr   r   r   setoptionsr   r   rI   r   r   r   r   r   rG   r   r5   )r   rF   r   r   opts        r   test_case_sensitivity#BasicTestCase.test_case_sensitivity  s&   ^^
s
s
sKKM	
1o
sC!
2::c?SE"
266#sWM	O|::;FF3W% < 	c3/0sC01
sE;'/COOc3'KM 0 	2::c?UG$
2::c?SE"
c"
2::c?B __ELL"$% 	2::k"XJ/
266+x(*CD __ 006tq7I0J',Wo  7 	i785 <;s    J
Jc           	      *   U R                  5       n0 US'   SS0US'   0 US'   U Vs/ s H  o"PM     nnUR                  5         U R                  nU R                  nU" U[	        SSU R
                  S/5      5        U" US   R                  5       S15        U" US   S   SS5        U R                  [        5         SUS   S'   S S S 5        U R                  SUS   ;   5        SUS   S'   S	 H  nU R                  XaS   ;   S
5        M     U" US   R                  5       S15        U" US   R                  5       S15        US   S	 U" US   R                  5       0 5        U R                  SR                  U R                  S   5      5      nU" US   R                  5       S15        U" US   S   S5        U R                  SR                  U R                  S   5      SS0S9nU R                  SUS   ;   5        g s  snf ! , (       d  f       GNF= f)Nr   r   rd   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )rA   r   r   assertCountEqualr
   r;   r   r   r   r   rG   r   r5   )r   rF   r   r   r   elem_eqr   s          r   $test_case_sensitivity_mapping_access2BasicTestCase.test_case_sensitivity_mapping_access  s   ^^3.33$&'BWB'	''
1fc3 4 4c:;<
2c7<<>C5!
2c73<M	Ox("BsGCL ) 	r#w'$3/COO#wKM 0 	2c7<<>E7#
2c7<<>C5!sGCL3# __ELL"$% 	2k?!H:.
2k?8$&?@ __ 006tq7I0J',Wo  7 	I./C ( )(s   G>;	H
Hc                    U R                  SS05      nU R                  UR                  U R                  S5      SS5        U R                  SS05      nU R                  UR                  U R                  S5      SS5        g )Nr^   BarFoor   z<could not locate option, expecting case-insensitive defaults)rA   r   r   r;   r   rF   s     r   test_default_case_sensitivity+BasicTestCase.test_default_case_sensitivity  sx    ^^UEN+FF4''/N	P ^^UEN+FF4''/J	Lr   c                 v   U R                  5       nU R                  U[        R                  SR	                  U R
                  S   5      5        U R                  U[        R                  SR	                  U R
                  S   5      5        U R                  U[        R                  S5      nU R                  UR                  S5        U R                  (       d  U R                  U[        R                  S5      nU R                  UR                  S5        [        R                  " SS	S
9nU R
                  S   S:X  a  [        R                  nU4nO[        R                  nUSS4n[        USS9 nU R                  XU5      nS S S 5        U R                  UR                  U5        g g ! , (       d  f       N,= f)Nz[Foo]
{}val-without-opt-name
r   r   No Section!
)<???>r   r   z[Foo]
  wrong-indent
)r   cfgparser.3
configdatasubdirr.   z.  # INI with as many tricky parts as possible
utf-8encoding)rA   parse_errorrI   ParsingErrorr   r5   MissingSectionHeaderErrorr   r   r4   r   findfileopen)r   rF   etrickyerrorexpectedfs          r   test_parse_errorsBasicTestCase.test_parse_errors  su   ^^\6644:F4??1;M4N	P 	\6644:F4??1;M4N	P R!G!G,.!>?""  \%>%> 9;AQVVZ0%%mLIFq!S($11"9$>>"AMOfw/1$$R2 0QVVX. # 0/s   1F**
F8c                     [        US5      (       a  UnO[        R                  " U5      nU R                  U5       nUR	                  U5        S S S 5        UR
                  $ ! , (       d  f       WR
                  $ = f)Nreadline)hasattrioStringIOr   	read_filer   )r   rF   excsrcsior   s         r   r   BasicTestCase.parse_error-  s`    3
##C++c"Cs#rLL $|| $#||s   A""
A;c                    U R                  5       nU R                  UR                  5       / S5        U R                  UR	                  S5      S5        U R                  [        R                  5         UR                  S5        S S S 5        U R                  [        R                  5         UR                  SSS5        S S S 5        U R                  U[        R                  SS5      nU R                  UR                  S5        UR                  S5        U R                  U[        R                  SS5      nU R                  UR                  S5        g ! , (       d  f       N= f! , (       d  f       N= f)	Nz0new ConfigParser should have no defined sectionsr   z5new ConfigParser should have no acknowledged sectionsr^   barrd   )r^   )r  r^   )rA   r   r   r   has_sectionr   rI   r   r   r   	get_errorr   r   r   r   rF   r   s      r   test_query_errorsBasicTestCase.test_query_errors6  s   ^^K	M.$	% |::;JJu <|::;FF5%) <NN2|::E5I*
uNN2|995%H0 <;;;s   2E+E&
E#&
E4c                      UR                  X45        U R                  SUR                  < SUR                  < 35        g ! U a  nUs S nA$ S nAff = f)Nzexpected exception type .)r   failr&   r'   )r   rF   r   r   r   r   s         r   r  BasicTestCase.get_errorG  sL    	<FF7# II)9)9; <  	H	s   A AAAAc                 Z   U R                  SR                  U R                  S   S95      n[        SS5       Hp  nU R	                  UR                  SSU-  5      5        U R                  UR                  SSU-  5      5        U R                  [        UR
                  SS	U-  5        Mr     g )
Nz[BOOLTEST]
T1{equals}1
T2{equals}TRUE
T3{equals}True
T4{equals}oN
T5{equals}yes
F1{equals}0
F2{equals}FALSE
F3{equals}False
F4{equals}oFF
F5{equals}nO
E1{equals}2
E2{equals}foo
E3{equals}-1
E4{equals}0.1
E5{equals}FALSE AND MOREr   equalsr      BOOLTESTzt%dzf%dze%d)	rG   r   r5   ranger   r   r   r   r   )r   rF   xs      r   test_booleanBasicTestCase.test_booleanP  s    __' (.vT__Q5Gv'H!$ q!AOOBMM*eai@AR]]:uqyABj mmZD r   c           	          U R                  5       nUR                  S5        U R                  [        R                  5       nUR                  S5        S S S 5        WR
                  nU R                  [        U5      S5        U R                  UR                  S5        U R                  (       Ga+  U R                  [        R                  5       nUR                  [        R                  " SR                  U R                  S   S95      SS9  S S S 5        UR
                  nU R                  [        U5      S	5        U R                  UR                  S
5        U R                  [        R                  5       nUR!                  SSSS.05        S S S 5        UR
                  nU R                  [        U5      S5        U R                  UR                  S5        g g ! , (       d  f       GN= f! , (       d  f       N= f! , (       d  f       Nv= f)Nr   zSection 'Foo' already exists)r   NNz                    [Foo]
                    will this be added{equals}True
                    [Bar]
                    what about this{equals}True
                    [Foo]
                    oops{equals}this won't
                r   r  	<foo-bar>sourcezFWhile reading from '<foo-bar>' [line  5]: section 'Foo' already exists)r   r  r  r   valzis really `opt`)r   OPTzIWhile reading from '<dict>': option 'opt' in section 'Bar' already exists)r   r   z<dict>N)rA   r   r   rI   r   r   r   strr   r:   rD   r   r   r   r5   r   r   )r   rF   r   r   s       r   test_weird_errorsBasicTestCase.test_weird_errorsi  s   ^^
u|AABbNN5! CLLQ!?@!45;;;""<#E#EF"x 0 F$//!"4F5 7 @K  L G ASV &O PQVV%<=""<#D#DEeU;L%MNO FASV &M NQVV%CD)  CB GF FEs$   G?G.8G?
G+.
G<?
Hc                    U R                  5       n[        R                  " SR                  U R                  S   S95      nU R
                  (       a:  U R                  [        R                  5         UR                  U5        S S S 5        OUR                  U5        U R                  UR                  SS5      S5        g ! , (       d  f       N1= f)Nz_            [Foo]
            x{equals}1
            y{equals}2
            y{equals}3
        r   r  r   r  rz   )rA   r   r   r   r5   r:   r   rI   r   rD   r   r   )r   rF   inis      r   %test_get_after_duplicate_option_error3BasicTestCase.test_get_after_duplicate_option_error  s    ^^oo 
 F$//!,F-/ ;;""<#D#DEs# FE NN3s+S1	 FEs   1C  
Cc                    SR                  U R                  U R                  S   U R                  S9nU R                  (       a  US-  nU R                  U5      nS H  n[        R                  " 5       nUR                  XCS9  U R                  S   nU(       a  SR                  U5      nSR                  UU R                  S	9nU R                  (       a  US
-  nU R                  UR                  5       U5        M     g )Na8  [Long Line]
foo{0[0]} this line is much, much longer than my editor
   likes it.
[{default_section}]
foo{0[1]} another very
 long line
[Long Line - With Comments!]
test {0[1]} we        {comment} can
            also      {comment} place
            comments  {comment} in
            multiline {comment} values
r   )commentr;   z![Valueless]
option-without-value
)TF)space_around_delimitersz {} z[{default_section}]
foo{equals}another very
	long line

[Long Line]
foo{equals}this line is much, much longer than my editor
	likes it.

[Long Line - With Comments!]
test{equals}we
	also
	comments
	multiline

)r  r;   z"[Valueless]
option-without-value

)r   r5   r6   r;   r4   rG   r   r   writer   getvalue)r   r   rF   r$  output	delimiterexpect_strings          r   
test_writeBasicTestCase.test_write  s     1F1Fq1I(,(<(<  > 	 %M
 __]+'4#[[]FHHVHM*I&"MM)4	 V9,0,@,@  B " ""
 V__.>; (5r   c                 t   U R                  SR                  U R                  S   S95      n " S S[        5      nUR	                  SSS5        UR	                  SSU" S5      5        UR	                  SS	S5        UR	                  SS	U" S5      5        UR	                  SSS5        UR	                  SS	S5        g )
N[sect]
option1{eq}foo
r   r   c                       \ rS rSrSrg)2BasicTestCase.test_set_string_types.<locals>.mystri  r$   N)r%   r&   r'   r(   r*   r$   r   r   mystrr0    s    r   r1  sectoption1splatoption2)rG   r   r5   r  r   )r   rF   r1  s      r   test_set_string_types#BasicTestCase.test_set_string_types  s    __ 006$//!:L0MO	C 	
vy'*
vy%.1
vy'*
vy%.1
vy'*
vy'*r   c                 :   U R                   S   S:w  a  U R                  S5        [        R                  " SSS9nU R	                  5       nUR                  US/SS	9nU R                  X1/5        U R                  UR                  S
S5      S5        U R	                  5       nUR                  USS	9nU R                  X1/5        U R                  UR                  S
S5      S5        U R	                  5       nUR                  [        R                  " U5      SS	9nU R                  X1/5        U R                  UR                  S
S5      S5        U R	                  5       nUR                  [        R                  " U5      U/SS	9nU R                  X1U/5        U R                  UR                  S
S5      S5        U R	                  5       nUR                  S/SS	9nU R                  U/ 5        U R	                  5       nUR                  / SS	9nU R                  U/ 5        g )Nr   r.   incompatible formatcfgparser.1r   r   nonexistent-filer   r   rR   r^   newbar)
r5   skipTestr   r   rA   readr   r   r   FakePath)r   file1rF   parsed_filess       r   test_read_returns_file_list)BasicTestCase.test_read_returns_file_list  s   ??1$MM/0  |D^^ww'9:WwMw/	518<^^wwuww7w/	518<^^wwy11%87wKw/	518<^^ww	 2 25 95AGwTu~6	518<^^ww 23gwFr*^^wwrGw4r*r   c                    U R                   S   S:w  a  U R                  S5        [        R                  " SSS9R	                  5       nU R                  5       nUR                  USS9nU R                  X1/5        U R                  5       nUR                  S	SS9nU R                  U/ 5        U R                  5       nUR                  US	/SS9nU R                  X1/5        g )
Nr   r.   r9  r:  r   r   r   r   s   nonexistent-file)r5   r=  r   r   encoderA   r>  r   )r   file1_bytestringrF   rA  s       r   0test_read_returns_file_list_with_bytestring_path>BasicTestCase.test_read_returns_file_list_with_bytestring_path  s    ??1$MM/0"++M,OVVX^^ww/'wB'9:^^ww2WwEr*^^ww 02EFQXwY'9:r   c                 X    U R                  SR                  U R                  S   S95      $ )Nah  [Foo]
bar{equals}something %(with1)s interpolation (1 step)
bar9{equals}something %(with9)s lots of interpolation (9 steps)
bar10{equals}something %(with10)s lots of interpolation (10 steps)
bar11{equals}something %(with11)s lots of interpolation (11 steps)
with11{equals}%(with10)s
with10{equals}%(with9)s
with9{equals}%(with8)s
with8{equals}%(With7)s
with7{equals}%(WITH6)s
with6{equals}%(with5)s
With5{equals}%(with4)s
WITH4{equals}%(with3)s
with3{equals}%(with2)s
with2{equals}%(with1)s
with1{equals}with

[Mutual Recursion]
foo{equals}%(bar)s
bar{equals}%(foo)s

[Interpolation Error]
name{equals}%(reference)s
r   r  )rG   r   r5   r   s    r   get_interpolation_config&BasicTestCase.get_interpolation_config  s1    *. +1&8J&*K1M 	Mr   c                 f   U R                  SR                  U R                  5      SS0S9n[        UR	                  SSS0S95      nUR                  5         U R                  X15        U R                  [        R                  5         UR	                  S5        S S S 5        g ! , (       d  f       g = f)	Nz
            [section]
            name {0[0]} %(value)s
            key{0[1]} |%(name)s|
            getdefault{0[1]} |%(default)s|
        default	<default>r   r   rd   rt   zno such section)
rG   r   r5   r   r   r   r   r   rI   r   )r   r   rF   r   s       r   check_items_config BasicTestCase.check_items_config)  s    __ 
 F4??#y+.F  H )7G*<=>	%|::;HH&' <;;s   B""
B0c                    U R                  SR                  U R                  5      SS0S9nU R                  UR	                  5       S   S5        U R                  UR	                  5       S   S5        U R                  UR	                  5       S   S5        U R                  [        5         UR	                  5         S S S 5        g ! , (       d  f       g = f)	N
            [section1]
            name1 {0[0]} value1
            [section2]
            name2 {0[0]} value2
            [section3]
            name3 {0[0]} value3
        rM  rN  r   r   section1section2section3)rG   r   r5   r   popitemr   r   r   s     r   test_popitemBasicTestCase.test_popitem6  s    __  F4??#y+.F  H 	a*5a*5a*5x(JJL )((s   *C
Cc                     U R                  SS05      nU R                  UR                  U R                  S5      SS5        SSS.US'   U R                  UR	                  5       S/5        U R                  [        US   R                  5       5      1 S	k5        UR                  5         U R                  [        UR	                  5       5      [        5       5        U R                  [        XR                     R                  5       5      S15        g )
Nr^   r   r   r   value1r   )r3  r5  zing>   r^   r3  r5  )rA   r   r   r;   r   r   r   clearr   s     r   
test_clearBasicTestCase.test_clearE  s    ^^UEN+FF4''/N	P "*h?6
1RZ__./1NO

R[[]+SU3R 4 45::<=wGr   c                 *   U R                  SR                  U R                  5      SS0S9nU R                  [	        US   R                  5       5      SS15        U R                  [	        US   R                  5       5      S	S15        U R                  [	        US
   R                  5       5      SS15        U R                  US   S   S5        U R                  US   S	   S5        U R                  US
   S   S5        U R                  UR                  5       / SQ5        SS0US'   U R                  [	        US   R                  5       5      SS15        U R                  US   S   S5        U R                  S	US   5        U R                  UR                  5       / SQ5        0 US
'   U R                  [	        US
   R                  5       5      S15        U R                  SUS
   5        U R                  UR                  5       / SQ5        XR                     XR                  '   U R                  [	        XR                     R                  5       5      [	        5       5        0 XR                  '   U R                  [	        XR                     R                  5       5      [	        5       5        U R                  [	        US   R                  5       5      S15        U R                  [	        US   R                  5       5      S15        U R                  [	        US
   R                  5       5      [	        5       5        U R                  UR                  5       / SQ5        US   US'   U R                  [	        US   R                  5       5      S15        g )NrR  nameDvalueDr   rS  name1namedrT  name2rU  name3rZ  r   value3)rS  rT  rU  name22value22)
rG   r   r5   r   r   r   r   assertNotInr;   assertNotEqualr   s     r   test_setitemBasicTestCase.test_setitemQ  s   __  F4??#w.A  C 	R
^0023gw5GHR
^0023gw5GHR
^0023gw5GHJ0(;J0(;J0(;(LM"I.:R
^0023h5HIJ19="Z.1(LM:R
^0023gY?"Z.1(LM#%&:&:#; C#7#7 8 = = ?@#%H#% R 4 45::<=suER
^0023gY?R
^0023hZ@R
^0023SU;(LMJ:R
^0023hZ@r   c                    U R                   (       a  U R                  S5        [        R                  " SR	                  U R
                  S   5      5      nU R                  5       nU R                  [        R                  5         UR                  U5        S S S 5        U R                  UR                  SS5      S5        U R                  US   S   S5        g ! , (       d  f       NI= f)Nz2if no_value is allowed, ParsingError is not raisedzC            [DEFAULT]
            test {0} test
            invalidr   DEFAULTtest)r4   r=  r   r   r   r5   rA   r   rI   r   rD   r   r   )r   invalidrF   s      r   test_invalid_multiline_value*BasicTestCase.test_invalid_multiline_valuew  s    MMNO// # vdooa01

 ^^|889NN7# :	62F;Iv.7 :9s   C
C'r$   N)r%   r&   r'   r(   r   r   r   r   r   r   r   r   r  r  r  r  r   r*  r6  rB  rG  rJ  rO  rW  r]  rk  rq  r*   r$   r   r   rN   rN   D   s    [-@A*FJX'9T&0PL/81"<D2E>24?l++B;$M6(
H$AL8r   rN   c                   0    \ rS rSr\R
                  rSrSrg)StrictTestCasei  Tr$   N)	r%   r&   r'   r(   rI   RawConfigParserr>   r:   r*   r$   r   r   rt  rt    s    //LFr   rt  c                   \    \ rS rSr\R
                  rS rS rS r	S r
S rS rS rS	 rS
rg)ConfigParserTestCasei  c                    U R                  5       nU R                  nU" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U R                  U[        R
                  SS5      nU R                  [        R                  :X  a  U R                  UR                  S	5        g g )
Nr   r  z%something with interpolation (1 step)bar9z.something with lots of interpolation (9 steps)bar10z/something with lots of interpolation (10 steps)bar11)r{  r   5something %(with11)s lots of interpolation (11 steps))	rJ  r   r   r  rI   InterpolationDepthErrorr<   rL   r   )r   rF   r   r   s       r   test_interpolation'ConfigParserTestCase.test_interpolation  s    **,
266%!HI
266% ;	=
266%!<	>NN2|CCUGT!4!44QVV &I J 5r   c                    U R                  5       nU R                  U[        R                  SS5      nU R	                  UR
                  S5        U R	                  UR                  S5        U R	                  UR                  S5        U R                  [        R                  :X  a  U R	                  UR                  S5        g g )NInterpolation Errorr   	reference)r   r  z%(reference)sr  )rJ  r  rI   InterpolationMissingOptionErrorr   r  r   r   r<   rL   r   r  s      r    test_interpolation_missing_value5ConfigParserTestCase.test_interpolation_missing_value  s    **,NN2|KK0&:k2$9:6*!4!44QVV &B C 5r   c                 *    U R                  / SQ5        g )N)rM  rN  )
getdefaultz|<default>|)r   z|value|)r   rd   rO  r   s    r   
test_itemsConfigParserTestCase.test_items  s     !4 	5r   c                     U R                  SR                  U R                  S   S95      nU R                  UR	                  SS5      S5        U R
                  [        R                  :X  a#  U R                  UR	                  SS5      S5        g g )	Nzc[section]
option1{eq}xxx
option2{eq}%(option1)s/xxx
ok{eq}%(option1)s/%%s
not_ok{eq}%(option2)s/%%sr   r.  r   okzxxx/%snot_okz
xxx/xxx/%s)rG   r   r5   r   r   r<   rI   rL   r   s     r   test_safe_interpolation,ConfigParserTestCase.test_safe_interpolation  s    __ 9 :@$(OOA$6 :@ :8	9 		40(;!4!44RVVIx8,G 5r   c                    U R                  SR                  U R                  S   S95      nU R                  UR	                  SS5      S5        U R                  [        UR                  SSS5        U R                  [        UR                  SSS5        U R                  [        UR                  SSS	5        U R                  UR	                  SS5      S5        UR                  SS
S5        U R                  UR	                  SS
5      S5        g )Nr-  r   r.  r2  r3  r^   z%foozfoo%zf%oor5  zfoo%%barzfoo%bar)rG   r   r5   r   r   r   r   r   r   s     r   #test_set_malformatted_interpolation8ConfigParserTestCase.test_set_malformatted_interpolation  s    __ 006$//!:L0MO 		2E:*bfffiH*bfffiH*bfffiH	2E: 	vy*-	2I>r   c                    U R                  SR                  U R                  S   S95      nU R                  [        UR
                  SSS5        U R                  [        UR
                  SSS5        U R                  [        UR
                  SS[        5       5        U R                  [        UR
                  SSS5        U R                  [        UR
                  SSS5        U R                  [        UR
                  SS[        5       5        U R                  [        UR
                  SS	S
5        U R                  [        UR                  S	5        g )Nr-  r   r.  r2  r3  r   g      ?r5  r   zinvalid opt name!)rG   r   r5   r   	TypeErrorr   objectr   r   s     r   test_set_nonstring_types-ConfigParserTestCase.test_set_nonstring_types  s    __ 006$//!:L0MO 	)RVVVYB)RVVVYD)RVVVYI)RVVVYB)RVVVYD)RVVVYI)RVVVS:MN)R^^S9r   c                 z    U R                  5       nU R                  [        UR                  U R                  5        g r	   )rA   r   r   r   r;   r   s     r   test_add_section_default-ConfigParserTestCase.test_add_section_default  s*    ^^*bnnd6J6JKr   c                    U R                  SS0S9nU R                  XR                     S   S5        U R                  XR                     R	                  S5      S5        U R                  SS0S9nU R                  XR                     S   S	5        U R                  XR                     R	                  S5      S5        g )
Nr   g      @r   rz   z2.5r   g      @r   z5.25)rA   r   r;   r   r   r   s     r   test_defaults_keyword*ConfigParserTestCase.test_defaults_keyword  s    ^^aX^.001#6>r"6"67@@EsK^^c4[^1001#6?r"6"67@@EtLr   r$   N)r%   r&   r'   r(   rI   ConfigParserr>   r~  r  r  r  r  r  r  r  r*   r$   r   r   rw  rw    s:    ,,LJ	C5
H? :LMr   rw  c                       \ rS rSr\R
                  rSr\R                  " S5      R                  5       rS rS rS rS rSrg)	#ConfigParserTestCaseNoInterpolationi  Nz
        [numbers]
        one = 1
        two = %(one)s * 2
        three = ${common:one} * 3

        [hexen]
        sixteen = ${numbers:two} * 8
    c                     U R                  US   S   S5        U R                  US   S   S5        U R                  US   S   S5        U R                  US   S	   S
5        g )Nnumbersonerz   twoz%(one)s * 2threez${common:one} * 3hexensixteenz${numbers:two} * 8)r   r   s     r   assertMatchesIni4ConfigParserTestCaseNoInterpolation.assertMatchesIni  sh    Iu-s3Iu-}=Iw/1DEGY/1EFr   c                 \    U R                  U R                  5      nU R                  U5        g r	   )rG   r  r  r   s     r   test_no_interpolation9ConfigParserTestCaseNoInterpolation.test_no_interpolation  s"    __TXX&b!r   c                 d    U R                  5       nU R                  UR                  S5      5        g N )rA   assertIsNonerD   r   s     r   test_empty_case3ConfigParserTestCaseNoInterpolation.test_empty_case  s%    ^^"..,-r   c                      " S S[         R                  5      nU" 5       nUR                  U R                  5        U R	                  U5        g )Nc                       \ rS rSrSrSrg)bConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation.<locals>.CustomConfigParseri  Nr$   )r%   r&   r'   r(   _DEFAULT_INTERPOLATIONr*   r$   r   r   CustomConfigParserr    s    %)"r   r  )rI   r  rD   r  r  )r   r  rF   s      r   "test_none_as_default_interpolationFConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation   s<    	*!:!: 	*  !
txx b!r   r$   )r%   r&   r'   r(   rI   r  r>   r<   r   r   stripr  r  r  r  r  r*   r$   r   r   r  r    sF    ,,LM
//  	 
 G"."r   r  c                       \ rS rSrS rSrg),ConfigParserTestCaseInvalidInterpolationTypei  c                    [         R                  SS4 HM  nU R                  US9   U R                  [        5         [         R
                  " US9  S S S 5        S S S 5        MO     g ! , (       d  f       N= f! , (       d  f       Mr  = f)Nrh   za string)rd   r<   )rI   ExtendedInterpolationsubTestr   r  r  )r   rd   s     r   *test_error_on_wrong_type_for_interpolationWConfigParserTestCaseInvalidInterpolationType.test_error_on_wrong_type_for_interpolation	  sa    "882
KEE*&&y1 --EB 2 +* L11 +*s"   A7A&A7&
A40A77
B	r$   N)r%   r&   r'   r(   r  r*   r$   r   r   r  r    s    Cr   r  c                        \ rS rSrSrSrSrSrg))ConfigParserTestCaseNonStandardDelimitersi  z:=$//"r$   Nr%   r&   r'   r(   r5   r6   r7   r*   r$   r   r   r  r        J")r   r  c                       \ rS rSrSrSrg)-ConfigParserTestCaseNonStandardDefaultSectioni  generalr$   N)r%   r&   r'   r(   r;   r*   r$   r   r   r  r    s    Or   r  c                   b    \ rS rSr\R
                  rSR                  SS5      rS r	S r
S rSrg	)
MultilineValuesTestCasei  zSI'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam! 	
c                    U R                  5       n[        S5       Hc  nSR                  U5      nUR                  U5        [        S5       H/  nUR	                  USR                  U5      U R
                  5        M1     Me     [        [        R                  SSS9 nUR                  U5        S S S 5        g ! , (       d  f       g = f)Nd   z	section{}
   zlovely_spam{}wr   r   )
rA   r  r   r   r   wonderful_spamr   r   TESTFNr%  )r   rF   r   sjr   s         r   setUpMultilineValuesTestCase.setUp   s    ^^sA""1%ANN12Yq/003T5H5HI  
 )""C':aHHQK ;::s   B77
Cc                 L    [         R                  " [        R                  5        g r	   )osunlinkr   r  r   s    r   tearDown MultilineValuesTestCase.tearDown*  s    
		)""#r   c                 "   U R                  5       n[        [        R                  SS9 nUR	                  U5        S S S 5        U R                  UR                  SS5      U R                  R                  SS5      5        g ! , (       d  f       NK= f)Nr   r   section8lovely_spam4r  
)	rA   r   r   r  r   r   r   r  replace)r   cf_from_filer   s      r    test_dominating_multiline_values8MultilineValuesTestCase.test_dominating_multiline_values-  sr     ~~')""W5""1% 6))*nE,,44VTB	D 65s   B  
Br$   N)r%   r&   r'   r(   rI   r  r>   r  r  r  r  r  r*   r$   r   r   r  r    s3    ,,L,-4WS&-A $Dr   r  c                   D    \ rS rSr\R
                  rS rS rS r	S r
Srg)RawConfigParserTestCasei7  c                    U R                  5       nU R                  nU" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S5        U" UR                  SS5      S	5        g )
Nr   r  z*something %(with1)s interpolation (1 step)ry  z3something %(with9)s lots of interpolation (9 steps)rz  z5something %(with10)s lots of interpolation (10 steps)r{  r|  )rJ  r   r   r   rF   r   s      r   r~  *RawConfigParserTestCase.test_interpolation:  s~    **,
266%7	9
266% @	B
266%!B	D
266%!B	Dr   c                 *    U R                  / SQ5        g )N)r  )r  z|%(default)s|)r   z
|%(name)s|)r   z	%(value)sr  r   s    r   r  "RawConfigParserTestCase.test_itemsF  s     !8 	9r   c                    U R                  5       nUR                  S5        UR                  SSS5        UR                  SS/ SQ5        UR                  SSSS05        U R                  UR	                  SS5      S5        U R                  UR	                  SS5      / SQ5        U R                  UR	                  SS5      SS05        UR                  S	5        UR                  S	S
S5        U R                  UR	                  S	S
5      S5        UR
                  [        R                  L a>  S Ul        UR                  SSS5        U R                  UR	                  SS5      S5        g g )Nz
non-stringrg   r   r   )r   r   r         r        r=   pign!	@r   zthis is sickTc                     U $ r	   r$   )r  s    r   <lambda>BRawConfigParserTestCase.test_set_nonstring_types.<locals>.<lambda>\  s    qr   )	rA   r   r   r   r   _dictrI   rJ   optionxformr   s     r   r  0RawConfigParserTestCase.test_set_nonstring_typesL  s)   ^^
|$
|UA&
|V%>?
|VdG_5e4a8f52	4f5gG
s
sND)^4d;88|111 )BNFF<A&RVVL!4a8 2r   c                 6   U R                  [        5       nU R                  SS0S9  S S S 5        WR                  nU R	                  [        U5      S5        U R                  SS0S9nU R                  X0R                     S   S5        g ! , (       d  f       Nh= f)Nr   g333333@r   z%'int' object has no attribute 'lower'r   g@r   )r   r   rA   r   r   r  r   r;   )r   ctxerrrF   s       r   r  -RawConfigParserTestCase.test_defaults_keyword`  s    ~.#NNQHN- /mmS#JK^^c3Z^0r"6"67<cB /.s   B


Br$   N)r%   r&   r'   r(   rI   ru  r>   r~  r  r  r  r*   r$   r   r   r  r  7  s#    //L
D99(Cr   r  c                        \ rS rSrSrSrSrSrg),RawConfigParserTestCaseNonStandardDelimitersij  r  r  r$   Nr  r$   r   r   r  r  j  r  r   r  c                   >    \ rS rSr\R
                  rSrSrSr	S r
Srg)RawConfigParserTestSambaConfip  )r1   r0   z----)r  Fc                    [         R                  " SSS9nU R                  5       nUR                  US/SS9nU R	                  X1/5        / SQnU R	                  UR                  5       U5        U R	                  UR                  SS	5      S
5        U R	                  UR                  SS5      S5        U R	                  UR                  SS5      S5        U R	                  UR                  SS5      S5        g )Nzcfgparser.2r   r   r;  r   r   )globalhomesprinterszprint$zpdf-generatortmpAgustinr  	workgroupMDKGROUPzmax log size2   zhosts allowz127.r
  zecho commandzcat %s; rm %s)r   r   rA   r>  r   r   r   r   )r   smbconfrF   rA  r   s        r   test_reading)RawConfigParserTestSambaConf.test_readingv  s    ""=F^^ww);<wwOy1A1+6
C8^<bA-8&A~6Hr   r$   N)r%   r&   r'   r(   rI   ru  r>   r6   r7   r8   r  r*   r$   r   r   r  r  p  s%    //L)%!Ir   r  c                       \ rS rSr\R
                  r\R                  " 5       rSr	Sr
SS jrS rS rS rS	 rS
 rS rSrg))ConfigParserTestCaseExtendedInterpolationi  commonTNc                 d    U R                  U5      nU(       a  X4l        UR                  U5        U$ r	   )rA   r  rD   )r   rE   r3   r  rF   s        r   rG   4ConfigParserTestCaseExtendedInterpolation.fromstring  s)    ^^H%(N
v	r   c                    U R                  [        R                  " S5      R                  5       5      nU R                  nU" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S	5        U" US   S
   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S
   S5        U" US   S   S5        g )Na  
            [common]
            favourite Beatle = Paul
            favourite color = green

            [tom]
            favourite band = ${favourite color} day
            favourite pope = John ${favourite Beatle} II
            sequel = ${favourite pope}I

            [ambv]
            favourite Beatle = George
            son of Edward VII = ${favourite Beatle} V
            son of George V = ${son of Edward VII}I

            [stanley]
            favourite Beatle = ${ambv:favourite Beatle}
            favourite pope = ${tom:favourite pope}
            favourite color = black
            favourite state of mind = paranoid
            favourite movie = soylent ${common:favourite color}
            favourite song = ${favourite color} sabbath - ${favourite state of mind}
        r  zfavourite BeatlePaulzfavourite colorgreentomzfavourite bandz	green dayzfavourite popezJohn Paul IIsequelzJohn Paul IIIambvGeorgezson of Edward VIIzGeorge Vzson of George Vz	George VIstanleyblackzfavourite state of mindparanoidzfavourite moviezsoylent greenzfavourite songzblack sabbath - paranoid)rG   r   r   r  r   r  s      r   test_extended_interpolationEConfigParserTestCaseExtendedInterpolation.test_extended_interpolation  s   __X__ . , UW-0 
2h<*+V4
2h<)*G4
2e9'(&1
2e9&'1
2e9%&4
2e9%&7
2e9X0
2f:()84
2f:'('2
2f:)*J7
2f:'(+6
2i=+,h7
2i=*+W5
2i=23Z@
2i=*+_=
2i=)*N;
2i=)*%	'r   c                 n   U R                  [        R                  " S5      R                  5       5      nU R	                  [
        R                  5         US   S     S S S 5        U R	                  [
        R                  5         US   S     S S S 5        g ! , (       d  f       N?= f! , (       d  f       g = f)Nz
            [one for you]
            ping = ${one for me:pong}

            [one for me]
            pong = ${one for you:ping}

            [selfish]
            me = ${me}
        zone for youpingselfishme)rG   r   r   r  r   rI   r}  r   s     r   test_endless_loop;ConfigParserTestCaseExtendedInterpolation.test_endless_loop  s    __X__ 	. 	 UW	 |CCD}f% E|CCDyM$ ED EDDDs   	B	B&
B#&
B4c                    U R                  S5      nU R                  US   S   S5        U R                  US   S   S5        U R                  US   S   S5        [        R                  nU R	                  U5       nUS   S	     S S S 5        U R                  WR
                  R                  S
5        U R                  UR
                  R                  S   S5        g ! , (       d  f       N^= f)Nz
            [dollars]
            $var = $$value
            $var2 = ${$var}
            ${sick} = cannot interpolate me

            [interpolated]
            $other = ${dollars:$var}
            $trying = ${dollars:${sick}}
        dollarsz$varz$valueinterpolatedz$otherz${sick}zcannot interpolate mez$tryingzdollars:${sickr  z${dollars:${sick}})rG   r   rI   r  r   r   r  r   )r   rF   exception_classr   s       r   test_strange_options>ConfigParserTestCaseExtendedInterpolation.test_strange_options  s    __ 	 	 	Iv.9N+H5x@Iy13JK&FF/2~y) 0//1AB**1-/CD 0/s   ;	C
C*c                 :   [         R                  " S5      R                  5       nU R                  U5      nU R                  nU" US   S   S5        U" US   S   S5        U" US   S   S5        U" US   S   S	5        U" US
   S   S5        U" US
   S   S5        g )Naj  
            [common]
            optionlower = value
            OptionUpper = Value

            [Common]
            optionlower = a better ${common:optionlower}
            OptionUpper = A Better ${common:OptionUpper}

            [random]
            foolower = ${common:optionlower} redefined
            FooUpper = ${Common:OptionUpper} Redefined
        r  optionlowerrd   OptionUpperValueCommona better valueA Better Valuerandomfoolowervalue redefinedFooUpperA Better Value Redefined)r   r   r  rG   r   r   r  rF   r   s       r   test_case_sensitivity_basicEConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_basic  s    oo   UW 	 __S!
2h<&0
2h<&0
2h<&(89
2h<&(89
2h<
#%67
2h<
#%?@r   c                    [         R                  " S5      R                  5       nU R                  [        R
                  5         U R                  U5      nS S S 5        U R                  US S9nU R                  nU" US   S   S5        U" US   S   S5        U" US	   S   S
5        U" US	   S   S5        U" US   S   S5        U" US   S   S5        g ! , (       d  f       N= f)Na8  
            [common]
            option = value
            Option = Value

            [Common]
            option = a better ${common:option}
            Option = A Better ${common:Option}

            [random]
            foo = ${common:option} redefined
            Foo = ${Common:Option} Redefined
        c                     U $ r	   r$   )r   s    r   r  [ConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts.<locals>.<lambda>  s    #r   )r  r  r   rd   r   r2  r3  r4  r5  r6  r^   r8  r   r:  )r   r   r  r   rI   r   rG   r   r;  s       r   test_case_sensitivity_conflictsIConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts  s    oo   UW 	 |@@A%B B __So_>
2h<!7+
2h<!7+
2h<!#34
2h<!#34
2h< 12
2h< :; BAs   C
C$c                    U R                  S5      nU R                  [        R                  5         US   S     S S S 5        U R                  [        R                  5         US   S     S S S 5        U R                  [        R                  5         US   S     S S S 5        U R                  [        R                  5         US   S     S S S 5        U R                  [        R                  5         US   S     S S S 5        U R                  [
        5         SUS   S	'   S S S 5        g ! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       Ny= f! , (       d  f       g = f)
Na   
            [interpolation fail]
            case1 = ${where's the brace
            case2 = ${does_not_exist}
            case3 = ${wrong_section:wrong_value}
            case4 = ${i:like:colon:characters}
            case5 = $100 for Fail No 5!
        zinterpolation failcase1case2case3case4case5zBLACK $ABBATHcase6)rG   r   rI   InterpolationSyntaxErrorr  r   r   s     r   test_other_errors;ConfigParserTestCaseExtendedInterpolation.test_other_errors  s2   __   |DDE#$W- F|KKL#$W- M|KKL#$W- M|DDE#$W- F|DDE#$W- Fz*0?B#$W- +* FELLLLEEEE**sG   	D)!	D:	E	E1	E-	E>)
D7:
E
E
E*-
E;>
Fr$   )NN)r%   r&   r'   r(   rI   r  r>   r  r<   r;   r:   rG   r!  r'  r-  r<  rA  rK  r*   r$   r   r   r  r    sL    ,,L 668MOF+'Z "E*A0<6@r   r  c                       \ rS rSrSrSrg)ConfigParserTestCaseNoValuei/  Tr$   N)r%   r&   r'   r(   r4   r*   r$   r   r   rN  rN  /  s    Nr   rN  c                   F    \ rS rSr\R
                  " 5       rSrS rS r	Sr
g)NoValueAndExtendedInterpolationi3  Tc                     [         R                  " S5      nU R                  U5      nU R                  US   S   S 5        U R	                  US   S   S5        g )Nz@
            [dummy]
            a
            b = ${a}
        dummyr   r   r  )r   r   rG   r   r   r   s      r   &test_interpolation_with_allow_no_valueFNoValueAndExtendedInterpolation.test_interpolation_with_allow_no_value7  sU     " 
 __V$bk#&-GS)2.r   c                     [         R                  " S5      nU R                  U5      nU R                  US   S   S5        U R                  US   S   S5        g )NzG
            [dummy]
            a = None
            b = ${a}
        rR  r   Noner   )r   r   rG   r   r   s      r   test_explicit_none2NoValueAndExtendedInterpolation.test_explicit_noneB  sW     " 
 __V$GS)62GS)62r   r$   N)r%   r&   r'   r(   rI   r  r<   r4   rS  rW  r*   r$   r   r   rP  rP  3  s     668MN	/	3r   rP  c                   ,    \ rS rSr\R
                  rSrg)/ConfigParserNoValueAndExtendedInterpolationTestiN  r$   N)r%   r&   r'   r(   rI   r  r>   r*   r$   r   r   rZ  rZ  N  s      ,,Lr   rZ  c                   ,    \ rS rSr\R
                  rSrg)2RawConfigParserNoValueAndExtendedInterpolationTestiU  r$   N)r%   r&   r'   r(   rI   ru  r>   r*   r$   r   r   r\  r\  U  s      //Lr   r\  c                   H    \ rS rSr\R
                  rS1rS1rSr	S r
S rSrg)	ConfigParserTestCaseTrickyFilei\  r.   r1   Tc           	          [         R                  " SSS9nU R                  5       nU R                  [	        UR                  USS95      S5        U R                  UR                  5       / SQ5        U R                  UR                  U R                  SS	S
0S9S5        U R                  [        5         UR                  U R                  SSS	S
0S9  S S S 5        U R                  [	        UR                  SS5      R                  S5      5      S5        U R                  [	        UR                  SS5      R                  S5      5      S5        SnU R                  UR                  US5      5        U R                  UR                  US5      S5        U R                  [	        UR                  S5      5      S5        U R                  [         R"                  5         UR                  S5        S S S 5        U R                  UR                  SS5      S5        U R                  UR                  SS5      UR                  SS5      5        U R                  UR                  S S5      S!5        g ! , (       d  f       GN= f! , (       d  f       N= f)"Nr   r   r   r   r   r   )strange
corruption&yeah, sections can be indented as wellanother one!no values heretricky interpolationmore interpolationgointerpolatez-1rt   T)rawru   r`  otherr     ra  rd   r  rb  zare they subsectionszlets use some Unicodeu	   片仮名rc  r  rd  re  letszdo thisrf  zgo shopping)r   r   rA   r   r   r>  r   r   r;   r   r   r   splitr   r   r   rI   r  )r   r   rF   longnames       r   test_cfgparser_dot_33ConfigParserTestCaseTrickyFile.test_cfgparser_dot_3b  s   !!-E^^RWWVgW>?C )? 	@ 	4#7#7)6(= # ?@B	Dz*IId**Dd)40  2 + 	RVVIw7==dCDaHRVVL':@@FGL;x1GHI*ABKPRXXn56:|KKLHH%& M 6?K 6? 6=	? 4f=}M! +* MLs   3I-I?-
I<?
Jc                     [         R                  " SSS9nU R                  5       nU R                  [        5         UR                  USS9  S S S 5        g ! , (       d  f       g = f)Nr   r   r   asciir   )r   r   rA   r   UnicodeDecodeErrorr>  )r   r   rF   s      r   test_unicode_failure3ConfigParserTestCaseTrickyFile.test_unicode_failure  sK    !!-E^^12GGFWG- 322s   A
A#r$   N)r%   r&   r'   r(   rI   r  r>   r5   r6   r4   rp  ru  r*   r$   r   r   r^  r^  \  s-    ,,LJuNN@.r   r^  c                   *    \ rS rSrSrS rS rS rSrg)Issue7005TestCasei  z[section]
option = None

c                     U" SS9nUR                  S5        UR                  SSS 5        [        R                  " 5       nUR	                  U5        UR                  5       $ NF)r4   r   r   )r   r   r   r   r%  r&  )r   r>   cpr   s       r   prepareIssue7005TestCase.prepare  sJ    /
y!
y(D)kkm
||~r   c                     [         R                  " SS9nUR                  S5        U R                  [        5         UR                  SSS 5        S S S 5        g ! , (       d  f       g = frz  )rI   r  r   r   r  r   )r   r{  s     r   test_none_as_value_stringified0Issue7005TestCase.test_none_as_value_stringified  sH    &&e<
y!y)FF9h- *))s   A
A&c                 x    U R                  [        R                  5      nU R                  XR                  5        g r	   )r|  rI   ru  r   expected_output)r   r'  s     r   "test_none_as_value_stringified_raw4Issue7005TestCase.test_none_as_value_stringified_raw  s*    l::;!5!56r   r$   N)	r%   r&   r'   r(   r  r|  r  r  r*   r$   r   r   rx  rx    s     5O.7r   rx  c                       \ rS rSr\rS rSrg)SortedTestCasei  c                     U R                  S5      n[        R                  " 5       nUR                  U5        U R	                  UR                  5       S5        g )Nz [b]
o4=1
o3=2
o2=3
o1=4
[a]
k=v
z,[a]
k = v

[b]
o1 = 4
o2 = 3
o3 = 2
o4 = 1

)rG   r   r   r%  r   r&  )r   rF   r'  s      r   test_sortedSortedTestCase.test_sorted  sJ    __ % & 
*&	'r   r$   N)r%   r&   r'   r(   r   r9   r  r*   r$   r   r   r  r    s    I'r   r  c                   :    \ rS rSr\R
                  rSrSrS r	Sr
g)CompatibleTestCasei  z#;r0   c                    [         R                  " S5      nU R                  U5      nU R                  UR	                  SS5      S5        U R                  UR	                  SS5      S5        U R                  UR	                  SS5      S5        g )	Nz        [Commented Bar]
        baz=qwe ; a comment
        foo: bar # not a comment!
        # but this is a comment
        ; another comment
        quirk: this;is not a comment
        ; a space must precede an inline comment
        rQ   r^   zbar # not a comment!r\   r]   quirkzthis;is not a comment)r   r   rG   r   r   r   s      r   test_comment_handling(CompatibleTestCase.test_comment_handling  s|      )  __]+7/	17?90	2r   r$   N)r%   r&   r'   r(   rI   ru  r>   r6   r7   r  r*   r$   r   r   r  r    s    //L!2r   r  c                   6    \ rS rSr\R
                  rSS jrSrg)CopyTestCasei  Nc                 T   U R                  U5      nUR                  U5        U R                  5       nUR                  U5        UR                  5        HP  nUR                  U R
                  :X  a  M  X0R
                     R                  5        H  u  pgXV   U:X  d  M  XV	 M     MR     U$ r	   )rA   rD   r   r   r   r;   r   )r   rE   r3   rF   cf_copyr   rM  rd   s           r   rG   CopyTestCase.fromstring  s    ^^H%
v.."" ~~'G||t333"$%9%9":"@"@"B#u,( #C ( r   r$   r	   )	r%   r&   r'   r(   rI   r  r>   rG   r*   r$   r   r   r  r    s    ,,Lr   r  c                        \ rS rSrS rS rSrg)FakeFilei  c                     [         R                  " SSS9n[        USS9 nUR                  5       U l        U R                  R                  5         S S S 5        g ! , (       d  f       g = f)Nr:  r   r   r   r   )r   r   r   	readlineslinesreverse)r   	file_pathr   s      r   __init__FakeFile.__init__  sI    $$]<H	)g.!DJJJ  /..s   0A
A'c                 l    [        U R                  5      (       a  U R                  R                  5       $ gr  )r   r  popr   s    r   r   FakeFile.readline  s#    tzz??::>>##r   )r  N)r%   r&   r'   r(   r  r   r*   r$   r   r   r  r    s    !r   r  c              #   v   #    U R                  5       nU(       a  Uv   U R                  5       nU(       a  M  g g 7fr	   )r   )r   lines     r   readline_generatorr    s*     ::<D

zz| $s   399c                   2    \ rS rSrS rS rS rS rS rSr	g)	ReadFileTestCasei  c                    [         R                  " SSS9/n UR                  US   R                  S5      5        U H{  n[
        R                  " 5       n[        USS9 nUR                  U5        S S S 5        U R                  SU5        U R                  S	US   5        U R                  US   S	   S
5        M}     g ! [         a     Nf = f! , (       d  f       Nb= f)Nr:  r   r   r   utf8r   r   rR   r^   r<  )r   r   r   rE  UnicodeEncodeErrorrI   r  r   r   assertInr   )r   
file_pathsr  r   r   s        r   	test_fileReadFileTestCase.test_file  s    &&}\JK
	jm226:; $I!..0Fi'2a  # 3MM)V,MM%	!23VI.u5x@ $ " 		 32s   #B= C=
C
	C

C	c                 4   [         R                  " S5      R                  5       R                  S5      n[        R
                  " 5       nUR                  U5        U R                  SU5        U R                  SUS   5        U R                  US   S   S5        g )Nz%
        [Foo Bar]
        foo=newbarr  rR   r^   r<  )	r   r   r  rn  rI   r  r   r  r   )r   r  r   s      r   test_iterableReadFileTestCase.test_iterable
  s     ! uwuuT{ 	 **,i(eVI./	*518<r   c                    [         R                  " 5       nU R                  [        5         UR	                  [        5       5        S S S 5        UR	                  [        [        5       5      5        U R                  SU5        U R                  SUS   5        U R                  US   S   S5        g ! , (       d  f       Np= f)NrR   r^   r<  )	rI   r  r   r  r   r  r  r  r   r   r   s     r   test_readline_generator(ReadFileTestCase.test_readline_generator  s    **,y)XZ( *+HJ78i(eVI./	*518< *)s   B//
B=c                    [         R                  " S5      R                  5       R                  S5      n[        R
                  " 5       nU R                  [        R                  5       nUR                  USS9  S S S 5        U R                  [        WR                  5      S5        [         R                  " S5      R                  5       R                  S5      n[        R
                  " 5       nU R                  [        R                  5       nUR                  USS9  S S S 5        U R                  [        UR                  5      S5        [         R                  " S5      R                  5       R                  S5      n[        R
                  " 5       nU R                  [        R                  5       nUR                  USS9  S S S 5        U R                  [        UR                  5      S	5        [         R                  " S
5      R                  5       R                  S5      n[        R
                  " 5       nU R                  [        R                  5       nUR                  USS9  S S S 5        U R                  [        UR                  5      S5        g ! , (       d  f       GN$= f! , (       d  f       GN= f! , (       d  f       N= f! , (       d  f       Ni= f)Nz"
        [badbad]
        [badbad]r  s   badbadr  zGWhile reading from b'badbad' [line  2]: section 'badbad' already existsz5
        [badbad]
        bad = bad
        bad = badzWWhile reading from b'badbad' [line  3]: option 'bad' in section 'badbad' already existsz
        [badbad]
        = badz=Source contains parsing errors: b'badbad'
	[line  2]: '= bad'z"
        [badbad
        bad = badzDFile contains no section headers.
file: b'badbad', line: 1
'[badbad')r   r   r  rn  rI   r  r   r   r   r   r  r   r   r   r   r   r  r   dses       r   test_source_as_bytes%ReadFileTestCase.test_source_as_bytes  s;    ! UWUU4[ 	 **,|AABcU95 C	

  !  egeeDk 	 **,|@@ASU95 B&	

  ! %'%%+ 	 **,|889SU95 :M	
  ! egeeDk 	 **,|EEF#U95 G	
G CB BA :9 GFs0   (JJ(2J:K
J%(
J7:
K
Kc                    / SQn[         R                  " SSSSS S9nU R                  [         R                  5       nUR	                  U5        S S S 5        U R                  [        WR                  5      S5        g ! , (       d  f       N4= f)N)z[SECT]
zKEY1
z KEY2 = VAL2
r  TF)r.   )r6   r4   r:   r5   r<   zZKey without value continued with an indented line.
file: '<???>', line: 3
' KEY2 = VAL2\n')rI   r  r   MultilineContinuationErrorr   r   r  r   r  s       r   -test_keys_without_value_with_extra_whitespace>ReadFileTestCase.test_keys_without_value_with_extra_whitespaceM  s    

 **
 |FFG3U# H 	
 HGs   A<<
B
r$   N)
r%   r&   r'   r(   r  r  r  r  r  r*   r$   r   r   r  r    s    A==-
^
r   r  c                   8    \ rS rSrS rS rS rS rS rS r	Sr
g	)
CoverageOneHundredTestCaseif  c                    [         R                  " SS5      nU R                  UR                  S5        U R                  UR                  S5        U R                  UR
                  S 5        U R                  UR                  S 5        U R                  UR                  S5        U R                  [        U5      S5        g )Nr   r   )r   r   NNz3Option 'option' in section 'section' already exists)	rI   r   r   r   r   r  linenor   r  r   r   s     r   test_duplicate_option_error6CoverageOneHundredTestCase.test_duplicate_option_errori  s    11)XF	2x0t,t,%FGU &6 	7r   c                     [         R                  " SSS5      nU R                  UR                  S5        U R                  UR                  S5        U R                  UR
                  S5        g )Nr   r   rawval)r   r   r  )rI   r}  r   r   r   r   r  s     r   test_interpolation_depth_error9CoverageOneHundredTestCase.test_interpolation_depth_errors  sV    44Xy5=?%DEx0	2r   c                 P   U R                  [        5       n[        R                  " 5         S S S 5        [        R                  " SS9nU R	                  UR
                  S5        [        R                  " S5      nU R	                  UR
                  S5        g ! , (       d  f       Nq= f)Nr  r  )r   r  rI   r   r   r  )r   r   r   s      r   test_parsing_error-CoverageOneHundredTestCase.test_parsing_errorz  st    y)R%%' *)):x0))(3x0 *)s   B
B%c                    [         R                  " 5       nUR                  S5        U R                  [         R                  5       nUS   S     S S S 5        U R                  [        WR                  5      S5        U R                  [         R                  5       nUS   S     S S S 5        U R                  [        UR                  5      S5        g ! , (       d  f       N= f! , (       d  f       NE= f)Nz
            [section]
            invalid_percent = %
            invalid_reference = %(()
            invalid_variable = %(does_not_exist)s
        r   invalid_percentz.'%' must be followed by '%' or '(', found: '%'invalid_referencez+bad interpolation variable reference '%(()')rI   r  rD   r   rJ  r   r  r   r   r   r   s      r   test_interpolation_validation8CoverageOneHundredTestCase.test_interpolation_validation  s    **,  	 |DDE9/0 FR\\* -> 	?|DDE912 FR\\* -? 	@ FE FEs   	C	C#
C #
C1c                     [         R                  " 5       nUR                  S5        U R                  [	        US   5      S5        g )Nz7
            [section]
            key = value
        r   z<Section: section>)rI   r  rD   r   reprr  s     r   test_sectionproxy_repr1CoverageOneHundredTestCase.test_sectionproxy_repr  s@    **,  	 	fY/02FGr   c                 x   [         R                  " 5       nSS KnUR                  UR                  S'   UR                  S5        U R                  SUR                  5        U R                  UR                  SS5      S5        U R                  UR                  SS5      S	5        U R                  US   R                  S5      S5        U R                  US   R                  S5      S	5        U?U R                  [        5         UR                  SS5        S S S 5        U R                  SUR                  5        UR                  S	 U R                  SUR                  5        U R                  [        5         UR                  SS5        S S S 5        U R                  [        5         US   R                  S5        S S S 5        U R                  [        5         US   R                  S5        S S S 5        g ! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       Nc= f! , (       d  f       g = f)
Nr   decimalzS
            [s1]
            one = 1
            [s2]
            two = 2
        s1r  r   s2r  r  )rI   r  r  Decimal
convertersrD   r  r   
getdecimalr   r   ri  )r   r   r  s      r   "test_inconsistent_converters_state=CoverageOneHundredTestCase.test_inconsistent_converters_state  s   **,'.)$  	 	i!2!23**47;**47;007;007;~.dE* /i!2!23i(F$5$56~.dE* /~.4L##E* /~.4L##E* /. /.
 /.....s0   G88H	(HH+8
H	
H
H(+
H9r$   N)r%   r&   r'   r(   r  r  r  r  r  r  r*   r$   r   r   r  r  f  s"    731@"H+r   r  c                   V    \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rSrg)ExceptionPicklingTestCasei  c                 N   SS K n[        R                  " S5      n[        UR                  S-   5       Ho  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  [        U5      [        U5      5        Mq     g )Nr   rd   r   )
picklerI   Errorr  HIGHEST_PROTOCOLdumpsloadsr   messager  r   r  e1protopicklede2s         r   
test_error$ExceptionPicklingTestCase.test_error  s{    (622Q67Ell2-Gg&BRZZ4T"XtBx0	 8r   c                    SS K n[        R                  " S5      n[        UR                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g )Nr   r   r   )r  rI   r   r  r  r  r  r   r  r   r   r  r  s         r   test_nosectionerror-ExceptionPicklingTestCase.test_nosectionerror  s    ((3622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4T"XtBx0 8r   c                 4   SS K n[        R                  " SS5      n[        UR                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g )Nr   r   r   r   )r  rI   r   r  r  r  r  r   r  r   r   r   r  r  s         r   test_nooptionerror,ExceptionPicklingTestCase.test_nooptionerror  s    '')<622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2T"XtBx0 8r   c                    SS K n[        R                  " SSS5      n[        UR                  S-   5       GH  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        GM     g )Nr   r   r  r   r   )r  rI   r   r  r  r  r  r   r  r   r   r  r  r  r  s         r   test_duplicatesectionerror4ExceptionPicklingTestCase.test_duplicatesectionerror  s    //	8SI622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2RYY		2T"XtBx0 8r   c                    SS K n[        R                  " SSSS5      n[        UR                  S-   5       GH.  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        GM1     g )Nr   r   r   r  r   r   )r  rI   r   r  r  r  r  r   r  r   r   r   r  r  r  r  s         r   test_duplicateoptionerror3ExceptionPicklingTestCase.test_duplicateoptionerror  s    ..y(H622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2RYY		2RYY		2T"XtBx0 8r   c                 6   SS K n[        R                  " SSS5      n[        UR                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g Nr   r   r   msgr   )r  rI   InterpolationErrorr  r  r  r  r   r  r   r   r   r  r  s         r   test_interpolationerror1ExceptionPicklingTestCase.test_interpolationerror  s    ,,Xy%H622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2T"XtBx0 8r   c                    SS K n[        R                  " SSSS5      n[        UR                  S-   5       GH  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        GM     g )Nr   r   r   r  r  r   )r  rI   r  r  r  r  r  r   r  r   r   r   r  r  r  s         r   $test_interpolationmissingoptionerror>ExceptionPicklingTestCase.test_interpolationmissingoptionerror  s    99(Ik#622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2R\\2<<8T"XtBx0 8r   c                 6   SS K n[        R                  " SSS5      n[        UR                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g r  )r  rI   rJ  r  r  r  r  r   r  r   r   r   r  r  s         r   test_interpolationsyntaxerror7ExceptionPicklingTestCase.test_interpolationsyntaxerror  s    228YN622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2T"XtBx0 8r   c                 6   SS K n[        R                  " SSS5      n[        UR                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g )Nr   r   r   r  r   )r  rI   r}  r  r  r  r  r   r  r   r   r   r  r  s         r   test_interpolationdeptherror6ExceptionPicklingTestCase.test_interpolationdeptherror  s    11(I622Q67Ell2-Gg&BRZZ4RWWbgg.RZZ4RYY		2T"XtBx0 8r   c                 0   SS K n[        R                  " S5      nUR                  SS5        UR                  SS5        UR                  SS5        [	        UR
                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     [        R                  " S	5      nUR                  SS5        UR                  SS5        UR                  SS5        [	        UR
                  S-   5       H  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        M     g )
Nr   r  r   line1r  line2r  line3filename)r  rI   r   r   r  r  r  r  r   r  r   r  errorsr  r  s         r   test_parsingerror+ExceptionPicklingTestCase.test_parsingerror*  s   &&x0
		!W
		!W
		!W622Q67Ell2-Gg&BRZZ4RWWbgg.RYY		2RYY		2T"XtBx0 8 &&z2
		!W
		!W
		!W622Q67Ell2-Gg&BRZZ4RWWbgg.RYY		2RYY		2T"XtBx0 8r   c                    SS K n[        R                  " SSS5      n[        UR                  S-   5       GH  nUR                  X#5      nUR                  U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  [        U5      [        U5      5        GM     g )Nr   r  r   r  r   )r  rI   r   r  r  r  r  r   r  r   r  r  r  r  r  s         r   test_missingsectionheadererror8ExceptionPicklingTestCase.test_missingsectionheadererrorE  s    33JVL622Q67Ell2-Gg&BRZZ4RWWbgg.RWWbgg.RYY		2RYY		2T"XtBx0 8r   r$   N)r%   r&   r'   r(   r  r  r  r  r  r  r  r  r  r  r  r*   r$   r   r   r  r    s9    1	1
111
11
11161r   r  c                       \ rS rSrS rSrg)InlineCommentStrippingTestCaseiS  c                    [         R                  " SS9nUR                  S5        US   nU R                  US   S5        U R                  US   S5        U R                  US	   S
5        U R                  US   S5        U R                  US   S5        U R                  US   S5        U R                  US   S5        US   nU R                  US   S5        U R                  US   S5        U R                  US	   S5        g )N)r0   r1   r  )r7   a  
        [section]
        k1 = v1;still v1
        k2 = v2 ;a comment
        k3 = v3 ; also a comment
        k4 = v4;still v4 ;a comment
        k5 = v5;still v5 ; also a comment
        k6 = v6;still v6; and still v6 ;a comment
        k7 = v7;still v7; and still v7 ; also a comment

        [multiprefix]
        k1 = v1;still v1 #a comment ; yeah, pretty much
        k2 = v2 // this already is a comment ; continued
        k3 = v3;#//still v3# and still v3 ; a comment
        r   k1zv1;still v1k2v2k3v3k4zv4;still v4k5zv5;still v5k6zv6;still v6; and still v6k7zv7;still v7; and still v7multiprefixzv3;#//still v3# and still v3)rI   r  rD   r   )r   cfgr  s      r   test_stripping-InlineCommentStrippingTestCase.test_strippingW  s	   '' A   	 	N4-04$'4$'4-04-04"=>4"=>4-04$'4"@Ar   r$   N)r%   r&   r'   r(   r"  r*   r$   r   r   r  r  S  s    Br   r  c                   2    \ rS rSrS rS rS rS rS rSr	g)	ExceptionContextTestCaseiw  c                 6   [         R                  " 5       nUR                  S5        U R                  [         R                  5      nU   UR                  SS5        S S S 5        U R                  UR                  R                  S5        g ! , (       d  f       N5= f)Nz
        [Paths]
        home_dir: /Users
        my_dir: %(home_dir1)s/lumberjack
        my_pictures: %(my_dir)s/Pictures
        Pathsmy_dirT)	rI   r  rD   r   r  r   r   r   __suppress_context__r  s      r   test_get_basic_interpolation5ExceptionContextTestCase.test_get_basic_interpolation{  sq    **,  	 |KKLJJw) bll77> Rs   B


Bc                 Z   [         R                  " [         R                  " 5       S9nUR                  S5        U R	                  [         R
                  5      nU   UR                  SS5        S S S 5        U R                  UR                  R                  S5        g ! , (       d  f       N5= f)Nr  z
        [Paths]
        home_dir: /Users
        my_dir: ${home_dir1}/lumberjack
        my_pictures: ${my_dir}/Pictures
        r'  r(  T)
rI   r  r  rD   r   r  r   r   r   r)  r  s      r   test_get_extended_interpolation8ExceptionContextTestCase.test_get_extended_interpolation  s    **$::<>  	 |KKLJJw) bll77> Rs   B
B*c                 0   [         R                  " 5       nUR                  S5        U R                  [         R                  5       nUR                  S5        S S S 5        U R                  WR                  R                  S5        g ! , (       d  f       N5= f)Nz2
        [Paths]
        home_dir: /Users
        ro  T)	rI   r  rD   r   r   r   r   r   r)  r  s      r   test_missing_options-ExceptionContextTestCase.test_missing_options  sm    **,  	 |::;rNN6" <bll77> <;s   B
Bc                    [         R                  " 5       nU R                  [         R                  5       nUR	                  SSS5        S S S 5        U R                  WR                  R                  S5        g ! , (       d  f       N5= f)NSection1an_int15T)rI   r  r   r   r   r   r   r)  r   r   r   s      r   test_missing_section-ExceptionContextTestCase.test_missing_section  s\    **,|::;rJJz8T2 <bll77> <;s   A88
Bc                    [         R                  " 5       nU R                  [         R                  5       nUR	                  SS5        S S S 5        U R                  WR                  R                  S5        g ! , (       d  f       N5= f)Nr3  r4  T)rI   r  r   r   r   r   r   r)  r6  s      r   test_remove_option+ExceptionContextTestCase.test_remove_option  s\    **,|::;r  X6 <bll77> <;s   A77
Br$   N)
r%   r&   r'   r(   r*  r-  r0  r7  r:  r*   r$   r   r   r%  r%  w  s    ?????r   r%  c                   J   ^  \ rS rSr\R
                  rSU 4S jjrS rSr	U =r
$ )ConvertersTestCasei  c                 B   > [         TU ]  US9nS UR                  S'   U$ )Nr   c                     U R                  5        Vs/ s H*  nUR                  5       (       d  M  UR                  5       PM,     sn$ s  snf r	   )rn  r  )vr   s     r   r  .ConvertersTestCase.newconfig.<locals>.<lambda>  s6    AGGI 1?Iq45GGI 2;I 1? 1?s
   AAr   )superrA   r  )r   r3   r@   	__class__s      r   rA   ConvertersTestCase.newconfig  s,    7$h$7'?F#r   c                 t   U R                  5       nU R                  SUR                  5        U R                  SUR                  5        U R                  UR                  S   5        U R                  UR                  S   5        U R                  UR                  S   5        U R	                  UR                  S   5        U R                  [        UR                  5      S5        U R                  [        5         S UR                  S'   S S S 5        U R                  [        5         S UR                  S '   S S S 5        UR                  S	5        US
   nU R                  US   S5        U R                  US   S5        U R                  US   S5        U R                  US   S5        U R                  US   S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      S5        U R                  UR                  S
S5      / SQ5        U R                  UR                  S
S5      S5        U R                  UR                  S5      S5        U R                  UR                  S5      S5        U R                  UR                  S5      S5        U R                  UR                  S5      / SQ5        U R                  UR                  S5      S5        U R                  [        5         UR!                  S
S5        S S S 5        U R                  [        5         UR!                  S5        S S S 5        SS KnUR$                  UR                  S'   U R                  SUR                  5        U R	                  UR                  S   5        U R                  [        UR                  5      S5        UR%                  S5      nU R                  UR!                  S
S5      U5        U R                  UR!                  S5      U5        UR                  S	 U R'                  SUR                  5        U R                  [        UR                  5      S5        U R                  [        5         UR!                  S
S5        S S S 5        U R                  [        5         UR!                  S5        S S S 5        U R                  [(        5         UR                  S	 S S S 5        U R                  [(        5         UR                  S	 S S S 5        U R                  [(        5         UR                  S 	 S S S 5        g ! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GNa= f! , (       d  f       GND= f! , (       d  f       GN= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       g = f)Nrl   r   rg   rj   rl  c                     U $ r	   r$   r@  s    r   r  4ConvertersTestCase.test_converters.<locals>.<lambda>  s    1r   r  c                     U $ r	   r$   rG  s    r   r  rH    s    Qr   z~
        [s]
        str = string
        int = 1
        float = 0.5
        list = a b c d e f g
        bool = yes
        r  r  rE   rz   z0.5za b c d e f gboolrx   r   g      ?)r   r   cdr   r   gTr   r  r  )rA   r  r  r  assertIsNotNoner   r   r   r   rD   r   r   r   getlistr   r   r  r  r  ri  r   )r   r!  r  r  dec0_5s        r   test_converters"ConvertersTestCase.test_converters  s   nni0fcnn-#../0#..12#..34S^^F34S^^,a0z*!,CNN2 +z*#.CNN4  +  	 H58,53'7U+6O46E*e,h7e,c2g.6f-?f-u5e,h7C/3c73S9S&1 4C 	DV4d;ux0%!,G,c26* -< 	=f-t4~.NN3( /~.LL! /$+OOy!i0S^^I67S^^,a0'W5v>g.7NN9%CNN3S^^,a0~.NN3( /~.LL! /x(y) )x(r" )x(t$ )(u +***B /... /...((((((sl   ;X)X.Y YY$ Y6/ZZZ)
X+.
X= 
Y
Y!$
Y36
Z
Z
Z&)
Z7r$   r	   )r%   r&   r'   r(   rI   r  r>   rA   rQ  r*   __classcell__rC  s   @r   r=  r=    s!      ,,LD% D%r   r=  c                   0    \ rS rSrSrS rS rS rS rSr	g)	!BlatantOverrideConvertersTestCasei  z
        [one]
        one = false
        two = false
        three = long story short

        [two]
        one = false
        two = false
        three = four
    c                     [         R                  " S[        0S9nUR                  U R                  5        U R                  U5        U R                  UR                  S   5        g )Nr   )r  )rI   r  r   rD   r   	_test_lenrN  r  r   r!  s     r   test_converters_at_init9BlatantOverrideConvertersTestCase.test_converters_at_init  sI    ''E3<@$sS^^E23r   c                     " S S[         R                  5      nU" 5       nUR                  U R                  5        U R	                  U5        U R                  UR                  S   5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        UR                  UR                  S'   U R                  UR                  SS5      5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        U R                  UR                  SS5      5        g )Nc                   r   ^  \ rS rSrSrSS\R                  S.U 4S jjrSS\R                  S.S jrSr	U =r
$ )	OBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParseri  z0a historic borough in south central PennsylvaniaFNrj  ru   rs   c                .   > X:X  a  g[         TU ]  XX4US9$ )NTr_  )rB  r   )r   r   r   rj  ru   rs   rC  s         r   r   ZBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getboolean  s*    $w)'s3; * = =r   c          	      .    U R                  X[        X4US9$ )Nr_  )	_get_convr   )r   r   r   rj  ru   rs   s         r   getlenVBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getlen  s!    ~~gs/7 & 9 9r   r$   )r%   r&   r'   r(   
gettysburgrI   rL   r   rd  r*   rS  rT  s   @r   StrangeConfigParserr^    s:    KJ9>T!-!4!4= = 6; , 3 39 9r   rg  r   r  r  rl   )rI   r  rD   r   rX  r  r  r   r   r   _convert_to_boolean)r   rg  r!  s      r   test_inheritance2BlatantOverrideConvertersTestCase.test_inheritance  s)   	9,";"; 	9 "#$s#../0ue45ue45u56u56$'$;$;y!u56u56u56u56r   c                 ^   U R                  [        UR                  5      S5        U R                  SUR                  5        U R                  SUR                  5        U R	                  SUR                  5        U R                  UR                  S   5        U R                  UR                  S   5        U R                  UR                  S   5        U R                  UR                  SS5      S5        U R                  UR                  SS	5      S5        U R                  UR                  SS
5      S5        U R                  UR                  S	S5      S5        U R                  UR                  S	S	5      S5        U R                  UR                  S	S
5      S5        U R                  UR                  S	SSS9S5        U R                  [        R                  5         UR                  S	S5        S S S 5        U R                  US   R                  S5      S5        U R                  US   R                  S	5      S5        U R                  US   R                  S
5      S5        U R                  US	   R                  S5      S5        U R                  US	   R                  S	5      S5        U R                  US	   R                  S
5      S5        U R                  US	   R                  SS5      S5        U R                  US	   R                  S5      S 5        g ! , (       d  f       GN1= f)Nrl  rl   r   tysburgrg   rj   r  r  r  r     fourr   rr   )
r   r   r  r  ri  r  rd  r   rI   r   rY  s     r   rX  +BlatantOverrideConvertersTestCase._test_len2  s   S^^,a0i0eS^^,CNN3#../0#..12#..34E5115E5115E73R8E5115E5115E73Q7E6A>B|99:JJuf% ;U**5115U**5115U**73R8U**5115U**5115U**73Q7U**615q9U**62D9 ;:s    L
L,c                    ^ [         R                  " 5       mS Tl        U4S jTl        TR	                  U R
                  5        U R                  [        TR                  5      S5        U R                  STR                  5        U R                  STR                  5        U R                  TR                  S   5        U R                  TR                  S   5        U R                  TR                  S   5        U R                  TR                  SS5      5        U R                  TR                  S	S	5      5        U R                  TR                  SS	5      5        U R                  TR                  S	S5      5        TR                  TR                  S'   U R                  TR                  SS5      5        U R                  TR                  S	S	5      5        U R                  TR                  SS	5      5        U R                  TR                  S	S5      5        U R                  TR                  SS5      S
5        U R                  TR                  SS	5      S
5        U R                  TR                  SS5      S5        U R                  TR                  S	S5      S
5        U R                  TR                  S	S	5      S
5        U R                  TR                  S	S5      S5        U R                  [         5         U R                  TS   R                  S5      S
5        S S S 5        U R                  [         5         U R                  TS	   R                  S5      S
5        S S S 5        g ! , (       d  f       NQ= f! , (       d  f       g = f)Nc                     g)NTr$   )r   r   s     r   r  LBlatantOverrideConvertersTestCase.test_instance_assignment.<locals>.<lambda>N  s    r   c                 &   > [        TU    U   5      $ r	   )r   )r   r   r!  s     r   r  rr  O  s    SWf1E-Fr   r  rl   r   rg   rj   r  r  r  r  rm  rl  )rI   r  r   rd  rD   r   r   r   r  r  ri  r  r   rh  r   r   r   rY  s    @r   test_instance_assignment:BlatantOverrideConvertersTestCase.test_instance_assignmentL  s   '')5F
$S^^,a0i0/#../0#..12#..34ue45ue45ue45ue45$'$;$;y!u56u56u56u56E5115E5115E73R8E5115E5115E73Q7 ~.SZ..u5q9 /~.SZ..u5q9 /. /...s   >%M. %M?.
M<?
Nr$   N)
r%   r&   r'   r(   r   rZ  ri  rX  rt  r*   r$   r   r   rV  rV    s    
F47::4:r   rV  c                   ,    \ rS rSrS rS rS rS rSrg)SectionlessTestCasein  c                 P    [         R                  " SS9nUR                  U5        U$ )NTallow_unnamed_section)rI   r  rD   )r   rE   r!  s      r   rG   SectionlessTestCase.fromstringp  s#    ''dC
r   c                    U R                  S5      nU R                  [        [        R                  S/5      [        UR                  5       5      5        U R                  SU[        R                     S   5        U R                  SU[        R                     S   5        U R                  SUS   S   5        [        R                  " 5       nUR                  U5        U R                  UR                  5       5      nU R                  SU[        R                     S   5        U R                  SU[        R                     S   5        U R                  SUS   S   5        g )	NzC
        a = 1
        b = 2
        [sect1]
        c = 3
        sect1rz   r   r|   r   3rK  )
rG   r   r   rI   UNNAMED_SECTIONr   r   r   r%  r&  r   cfg1r'  cfg2s       r   test_no_first_section)SectionlessTestCase.test_no_first_sectionu  s"       	l::GDEs4==?G[\d<#?#?@EFd<#?#?@EFd7mC01

6v01 	d<#?#?@EFd<#?#?@EFd7mC01r   c                    U R                  S5      nU R                  [        R                  /UR	                  5       5        U R                  SU[        R                     S   5        U R                  SU[        R                     S   5        [
        R                  " 5       nUR                  U5        U R                  UR                  5       5      nU R                  [        R                  /UR	                  5       5        U R                  SU[        R                     S   5        U R                  SU[        R                     S   5        g )Nz%
        a = 1
        b = 2
        rz   r   r|   r   )	rG   r   rI   r  r   r   r   r%  r&  r  s       r   test_no_section#SectionlessTestCase.test_no_section  s      
 	,667Id<#?#?@EFd<#?#?@EF

6v01,667Id<#?#?@EFd<#?#?@EFr   c                 f   [         R                  " SS9nUR                  S5        UR                  S5        U R                  [         R                  /UR                  5       5        U R                  SU[         R                     S   5        U R                  SU[         R                     S   5        g )	NTry  za = 1zb = 2rz   r   r|   r   )rI   r  rD   r   r  r   rY  s     r   test_multiple_configs)SectionlessTestCase.test_multiple_configs  s    ''dC  ,667Hc,">">?DEc,">">?DEr   r$   N)	r%   r&   r'   r(   rG   r  r  r  r*   r$   r   r   rw  rw  n  s    
2,G$Fr   rw  c                       \ rS rSrS rSrg)MiscTestCasei  c                 :    [         R                  " U [        S1S9  g )Nr  )not_exported)r   check__all__rI   r   s    r   test__all__MiscTestCase.test__all__  s    T<wiHr   r$   N)r%   r&   r'   r(   r  r*   r$   r   r   r  r    s    Ir   r  __main__)0collectionsrI   r   r  r   unittestro  r   test.supportr   UserDictr   r,   rN   TestCasert  rw  r  r  r  r  r  r  r  r  r  rN  rP  rZ  r\  r^  rx  r  r  r  r  r  r  r  r  r  r%  r=  rV  rw  r  r%   mainr$   r   r   <module>r     s     	 	    "%% . B@8* @8F]H$5$5 
VM=(*;*; VMr!"-9J9J !"FC83D3D C*0D * 4H  DmX->-> D:0CmX->-> 0Cf*3J *I#98;L;L I(h@x?P?P h@V"6 3&< 36-#-0#0*.%;X=N=N *.Z7)) 7:', '.2/1B1B 2,=("3"3 &
 
f
x(( f
VO+!2!2 O+dX1 1 1 X1v!BX%6%6 !BH3?x00 3?lO%(9(9 O%dl:(9(9 l:^6F(++ 6FrI8$$ I
 zMMO r   