+
    Bic                    ~   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	  ! R R] P                  4      t ! R R4      t ! R R	]4      t ! R
 R]]P                  4      t ! R R]]P                  4      t ! R R]]P                  4      t ! R R]P                  4      t ! R R]4      t ! R R]4      t ! R R]]P                  4      t ! R R]]P                  4      t ! R R]4      t ! R R]]P                  4      t ! R R]]P                  4      t ! R  R!]4      t ! R" R#]4      t ! R$ R%]]P                  4      t ! R& R']]P                  4      t ! R( R)]]P                  4      t ! R* R+]P                  4      t ! R, R-]4      t  ! R. R/]]P                  4      t! ! R0 R1]]P                  4      t" ! R2 R34      t#R4 t$ ! R5 R6]P                  4      t% ! R7 R8]P                  4      t& ! R9 R:]P                  4      t' ! R; R<]P                  4      t( ! R= R>]P                  4      t) ! R? R@]]P                  4      t* ! RA RB]P                  4      t+ ! RC RD]P                  4      t, ! RE RF]P                  4      t- ! RG RH]P                  4      t.]/RI8X  d   ]P`                  ! 4        R# R# )J    N)support)	os_helperc                   H   a  ] tR t^t o R tR tR tR tR tR t	]t
RtV tR# )	
SortedDictc                H    \        V P                  P                  4       4      # N)sorteddataitemsselfs   &-/usr/lib/python3.14/test/test_configparser.pyr   SortedDict.items   s    diioo'((    c                H    \        V P                  P                  4       4      # r   )r	   r
   keysr   s   &r   r   SortedDict.keys   s    diinn&''r   c                X    V P                  4        Uu. uF  q^,          NK  	  up# u upi )   )r   )r   is   & r   valuesSortedDict.values   s$    "jjl+l!l+++s   'c                4    \        V P                  4       4      # r   )iterr   r   s   &r   	iteritemsSortedDict.iteritems   s    DJJL!!r   c                4    \        V P                  4       4      # r   )r   r   r   s   &r   iterkeysSortedDict.iterkeys   s    DIIK  r   c                4    \        V P                  4       4      # 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____classdictcell____classdict__s   @r   r   r      s*     )(,"!# Hr   r   c                      a  ] tR t^#t o RtRtRtRtRt]	P                  tRt]	P                  t]	P                  tR	R ltR	R ltRtV tR# )
CfgParserTestCaseClassFTNc                   \        VV P                  V P                  V P                  V P                  V P
                  V P                  V P                  V P                  V P                  R 7
      pV P                  ! R/ VB pV# ))
defaultsallow_no_value
delimiterscomment_prefixesinline_comment_prefixesempty_lines_in_values	dict_typestrictdefault_sectioninterpolationr#   )dictr1   r2   r3   r4   r5   r6   r7   r8   r9   config_class)r   r0   	argumentsinstances   &&  r   	newconfig CfgParserTestCaseClass.newconfig.   st    ..!22$($@$@"&"<"<nn;; 00,,
	 $$1y1r   c                J    V P                  V4      pVP                  V4       V# r   )r>   read_string)r   stringr0   cfs   &&& r   
fromstring!CfgParserTestCaseClass.fromstring>   s!    ^^H%
v	r   r#   )=:);#r   )r$   r%   r&   r'   r1   r2   r3   r4   r5   configparser_default_dictr6   r7   DEFAULTSECTr8   _UNSETr9   r>   rD   r)   r*   r+   s   @r   r.   r.   #   sV     NJ!( **IF"..O ''M  r   r.   c                      a  ] tR t^Dt o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )BasicTestCasec                %   . R;OpV P                   '       d   VP                  R4       VP                  4        R<R=.pVP                  4       pVP                  4        V P                  pV! WB4       VP                  R4      pVP                  4        V! WC4       V Uu. uF  qfNK  	  ppVP                  4        VP                  V P                  4       VP                  4        V! WB4       VR,          P                  4       p\        \        V4      4      pV! WC4       VP                  4       p\        \        V4      4      pV P	                  \        V4      \        V4      4       V F  w  rvV! WvP                  4       K  	  V! VP                  4       WP                  ,          4       V! VP                  RR4      R4       V! VP                  RR4      R4       V! VP                  RR4      R4       V! VP                  RR	4      R
4       V! VP                  R R4      R4       V! VP                  R R	4      R
4       V! VP                  RR4      R4       V! VP                  RR4      R4       V! VP                  RR4      ^*4       V! VP                  RR4      R4       V P                  VP                  RR4      R4       V! VP                  RR4      R4       V! VP!                  RR4      R4       V! VP                  RR4      R4       V! VP                  RR4      R4       V P                   '       d   V! VP                  RR4      R 4       V! VP                  RRR	R!7      R4       V! VP                  RRRR	/R"7      R	4       V P#                  \$        P&                  4      ;_uu_ 4        VP                  R#R4       R R R 4       V P#                  \$        P(                  4      ;_uu_ 4        VP                  RR$4       R R R 4       V! VP                  R#RR	R!7      R	4       V! VP                  RR$R	R!7      R	4       V! VP                  RRR R!7      R4       V! VP                  R%RR R!7      R 4       V! VP                  RR^R!7      ^*4       V! VP                  RR&^R!7      ^4       V! VP                  RR&R'R!7      R'4       V P#                  \$        P(                  4      ;_uu_ 4        VP                  RR&4       R R R 4       V P                  VP                  RRR(R!7      R4       V P                  VP                  RR)R(R!7      R(4       V! VP                  RR)R*R!7      R*4       V P#                  \$        P(                  4      ;_uu_ 4        VP                  RR)4       R R R 4       V! VP!                  RRR+R!7      R4       V! VP!                  RR,R-R!7      R-4       V! VP!                  RR,R+R!7      R+4       V P#                  \$        P(                  4      ;_uu_ 4        VP!                  RR,4       R R R 4       V! VP!                  R.RR+R!7      R+4       V P                   '       d7   V! VP                  RRRR!7      R 4       V! VP                  RR/RR!7      R4       V! VR,          R,          R4       V! VR,          R,          R4       VR,          pV! VP                  R4       V P+                  VP,                  V4       V P#                  \.        4      ;_uu_ 4        R0Vn
        R R R 4       V P#                  \.        4      ;_uu_ 4        R1Vn        R R R 4       V! VR,          R4       V! VR	,          R
4       V! VR ,          R,          R4       V! VR ,          R	,          R
4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R24       V P                   '       d   V! VR,          R,          R 4       V! VR,          P                  RR	4      R4       V! VR,          P                  RR	R!7      R4       V! VR,          P                  RRR	/R"7      R	4       V P#                  \0        4      ;_uu_ 4        VR#,          R,           R R R 4       V P#                  \0        4      ;_uu_ 4        VR,          R$,           R R R 4       V P#                  \0        4      ;_uu_ 4        VR#,          P                  RR	R!7       R R R 4       V! VR,          P                  R$R	4      R	4       V! VR,          P                  R$R	R!7      R	4       V! VR,          P                  R$4      R 4       V! VR,          P                  RR 4      R4       V! VR,          P                  RR R!7      R4       V P#                  \0        4      ;_uu_ 4        VR%,          P                  RR 4       R R R 4       V! VR,          P                  R^4      ^*4       V! VR,          P                  R^R!7      ^*4       V! VR,          P                  R&^4      ^4       V! VR,          P                  R&^R!7      ^4       V! VR,          P                  R&R'4      R'4       V! VR,          P                  R&R'R!7      R'4       V! VR,          P                  R&4      R 4       V P                  VR,          P                  RR(4      R4       V P                  VR,          P                  RR(R!7      R4       V P                  VR,          P                  R)R(4      R(4       V P                  VR,          P                  R)R(R!7      R(4       V! VR,          P                  R)R*4      R*4       V! VR,          P                  R)R*R!7      R*4       V! VR,          P                  R)4      R 4       V! VR,          P!                  RR+4      R4       V! VR,          P!                  RR+R!7      R4       V! VR,          P!                  R,R-4      R-4       V! VR,          P!                  R,R-R!7      R-4       V! VR,          P!                  R,R+4      R+4       V! VR,          P!                  R,R+R!7      R+4       V! VR,          P!                  R,4      R 4       V P                   '       d   V! VR,          P                  RR4      R 4       V! VR,          P                  RRR!7      R 4       V! VR,          P                  R/R4      R4       V! VR,          P                  R/RR!7      R4       R3WP                  ,          R4&   R5WP                  ,          R6&   V P3                  VP5                  R4      4       V P7                  VP9                  RR4      4       V P7                  VP5                  R4      4       V P7                  VP5                  V P                  4      4       V P3                  VP;                  RR4      R74       V P7                  VP9                  RR4      R84       V P7                  VP;                  RR4      R94       V P3                  VP9                  RR44      4       V P7                  VP;                  RR44      4       V P3                  VP;                  V P                  R44      4       V P7                  VP9                  RR44      4       V P7                  VP;                  V P                  R44      4       V P#                  \$        P&                  4      ;_uu_ 4       pVP;                  R:R4       R R R 4       V P	                  XP<                  P>                  R>4       V! VP                  RR4      R24       VR V P7                  RV9   4       V P#                  \0        4      ;_uu_ 4        VR R R R 4       V P#                  \@        4      ;_uu_ 4        WP                   R R R 4       VR,          R V P7                  RVR,          9   4       V P#                  \0        4      ;_uu_ 4        VR,          R R R R 4       V P3                  R6VR,          9   4       V P#                  \0        4      ;_uu_ 4        VR,          R6 R R R 4       WP                  ,          R6 V P7                  R6VR,          9   4       V P#                  \0        4      ;_uu_ 4        WP                  ,          R6 R R R 4       V P#                  \0        4      ;_uu_ 4        VR:,          R R R R 4       R # u upi   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     E
L; i  + '       g   i     E
L; i  + '       g   i     E	LV; i  + '       g   i     E	L4; i  + '       g   i     E	L; i  + '       g   i     EL<; i  + '       g   i     EL; i  + '       g   i     ELq; i  + '       g   i     ELS; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     R # ; i)?Commented BarFoo Bar	Long LineSpaces
Spacey BarSpacey Bar From The BeginningTypesThis One Has A ] In ItNoValuebazqwefoobar3bar1bar2bar4key with spacesvalueanother with spacessplat!int42float)\(?z0.44booleanF123strange but acceptableforksspoonsoption-without-valueNfallbackvarszNo Such Foo Barzno-such-foozNo Such Spacey Barz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-only7this 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)
rQ   rR   Internationalized StuffrS   Section\with$weird%characters[	rT   rU   rV   rW   rX   )rZ   r[   )r\   r]   )rz   )!r1   appendsortsectionsassertEqualr   r8   r	   listlennamer0   getgetintassertAlmostEqualgetfloat
getbooleanassertRaisesrJ   NoSectionErrorNoOptionErrorassertIsparserAttributeErrorKeyError
assertTrueremove_sectionassertFalse
has_optionremove_option	exceptionargs
ValueError)	r   rC   EFLeqsectionr   cms	   &&       r   
basic_testBasicTestCase.basic_testF   sX   
 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  
AE65AE;7AF6AF#AF7.AG/AGAG3)AHAHAH/6AI1AI?AI+@(AI?A?AJC
AJ'D(AJ;E!AKE;AF	FAF 	F#AF4	F7AG	GAG	GAG0	G3AH	HAH	HAH,	H/AI 	IAI	IAI(	I+AI<	I?AJ	JAJ$	J'AJ8	J;AK	KAK 	c           	        R P                  V P                  V P                  4      pV P                  '       d
   VR,          pV P	                  V4      pV P                  V4       V P                  '       d   V P                  \        P                  4      ;_uu_ 4        VP                  \        P                  ! RP                  V P                  4      4      4       RRR4       V P                  \        P                  4      ;_uu_ 4        VP                  \        P                  ! RP                  V P                  4      4      4       RRR4       R# VP                  \        P                  ! RP                  V P                  4      4      4       VP                  \        P                  ! RP                  V P                  4      4      4       R#   + '       g   i     L; i  + '       g   i     R# ; i)ax  [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
                Nz                    [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
            )formatr2   r3   r1   rD   r   r7   r   rJ   DuplicateOptionErrorrA   textwrapdedentDuplicateSectionErrorr   config_stringrC   s   &  r   
test_basicBasicTestCase.test_basic&  sp   < F4??D112= 	> )M __]+;;;""<#D#DEEx 0 F4??+	 - . F ""<#E#EFFx 0
 F4??+ - . GF NN8?? , t'	) * NN8?? ,
 t') *) FE GFFs   ?G?G%G"	%G6	c                "   R RR/RRR/RRRRR/R	RR
RR/RRR/R/ RRRRRRRRR/RRRRR/RR^*RRRR ^{R!/R"R#R$//
pV P                   '       d   VP                  R%R&R'//4       V P                  4       pVP                  V4       V P	                  V4       V P
                  '       d   V P                  \        P                  4      ;_uu_ 4        VP                  R(R)R/^R*R+//4       R'R'R'4       V P                  \        P                  4      ;_uu_ 4        VP                  R,R-R.R/R0//4       R'R'R'4       R'# VP                  R1R)R/R2R*R+//4       VP                  R,R-R.R/R0//4       R'#   + '       g   i     L; i  + '       g   i     R'# ; i)3rR   r\   r^   rU   r_   rV   r]   rZ   r[   rQ   r`   rS   ru   r|   r{   zfoo[bg]	BulgarianDefaultzfoo[en]Englishzfoo[de]DeutschrT   ra   rb   rc   rd   rW   re   rg   rh   ri   Frk   rX   rl   rm   rY   rn   Nrv   keykey2value2zDuplicate Options Hereoptionzwith a valueOPTIONzwith another valuer   SECTION)
r1   updater>   	read_dictr   r7   r   rJ   r   r   r   configrC   s   &  r   test_basic_from_dict"BasicTestCase.test_basic_from_dicti  s   v v ,vu. vu   0 2%;y99	( !7%x r5-	 %'K(
R MM*D 
 ^^
V;;;""<#E#EFF%))  G
 ""<#D#DEE, . "6/  FE LLE7+FH-  LL(n2+ # GF
 FEEs   E*E=*E:	=F	c                ^   V P                  4       pVP                  R 4       VP                  R4       VP                  R4       VP                  4       pVP                  4        V P                  pV! V. RO4       VP                  RRR4       V! VP                  R4      R.4       V! VP                  RR4      RR4       V P                  \        P                  4      ;_uu_ 4        VP                  RR R4       RRR4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       VP                  R RR4       R F%  pV P                  VP                  R V4      R
4       K'  	  V! VP                  R 4      R	.4       V! VP                  R4      R.4       VP                  RR4       V! VP                  R4      . 4       V P                  RP!                  V P"                  ^ ,          4      4      pV! VP                  R4      R.4       V! VP                  RR4      R4       V P                  RP!                  V P"                  ^ ,          4      RR/R7      pV P                  VP                  RR4      4       R#   + '       g   i     EL; i)AaBrb   b@could not locate option, expecting case-insensitive option namesNA-B	A-B valuea-b9has_option() returned false for option which should exist3[MySection]
Option{} first line   
	second line   
	MySectionr   Optionfirst line
second line[section]
nekey{}nevalue
r   r0   r   Key)r   r   r   r   zA-bza-Br   )r>   add_sectionr   r~   r   setoptionsr   r   rJ   r   r   r   r   r   rD   r   r2   )r   rC   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           	        V P                  4       p/ VR &   RR/VR&   / VR&   V Uu. uF  q"NK  	  ppVP                  4        V P                  pV P                  pV! V\	        R RV P
                  R.4      4       V! VR,          P                  4       R04       V! VR,          R,          RR4       V P                  \        4      ;_uu_ 4        RVR,          R &   RRR4       V P                  RVR,          9   4       RVR ,          R&   R F  pV P                  WaR ,          9   R
4       K   	  V! VR ,          P                  4       R	04       V! VR,          P                  4       R04       VR,          R V! VR,          P                  4       / 4       V P                  RP                  V P                  ^ ,          4      4      pV! VR,          P                  4       R04       V! VR,          R,          R4       V P                  RP                  V P                  ^ ,          4      RR/R7      pV P                  RVR,          9   4       R# u upi   + '       g   i     EL; i)r   r   rb   r   r   r   Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r>   r~   r   assertCountEqualr	   r8   r   r   r   r   rD   r   r2   )r   rC   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   
III#	c                   V P                  R R/4      pV P                  VP                  V P                  R4      RR4       V P                  RR/4      pV P                  VP                  V P                  R4      RR4       R# )r\   BarFoor   z<could not locate option, expecting case-insensitive defaultsN)r>   r   r   r8   r   rC   s   & r   test_default_case_sensitivity+BasicTestCase.test_default_case_sensitivity  sx    ^^UEN+FF4''/N	P ^^UEN+FF4''/J	Lr   c                   V P                  4       pV P                  V\        P                  R P	                  V P
                  ^ ,          4      4       V P                  V\        P                  R P	                  V P
                  ^,          4      4       V P                  V\        P                  R4      pV P                  VP                  R4       V P                  '       g   V P                  V\        P                  R4      pV P                  VP                  R4       \        P                  ! RRR7      pV P
                  ^ ,          R8X  d   \        P                  pV3pM\        P                  pV^R3p\        VRR	7      ;_uu_ 4       pV P                  WV4      pR
R
R
4       V P                  VP                  V4       R
# R
#   + '       g   i     L0; i)z[Foo]
{}val-without-opt-name
No Section!
z[Foo]
  wrong-indent
cfgparser.3
configdatasubdirrF   z.  # INI with as many tricky parts as possible
utf-8encodingN)<???>r   r   )r   )r>   parse_errorrJ   ParsingErrorr   r2   MissingSectionHeaderErrorr   r   r1   r   findfileopen)r   rC   etrickyerrorexpectedfs   &      r   test_parse_errorsBasicTestCase.test_parse_errors  s{   ^^\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   GG	c                   \        VR 4      '       d   TpM\        P                  ! V4      pV P                  V4      ;_uu_ 4       pVP	                  V4       RRR4       VP
                  #   + '       g   i     XP
                  # ; i)readlineN)hasattrioStringIOr   	read_filer   )r   rC   excsrcsior   s   &&&&  r   r   BasicTestCase.parse_error-  sc    3
##C++c"Cs##rLL $|| $#||s   A++B	c                   V P                  4       pV P                  VP                  4       . R 4       V P                  VP	                  R4      R4       V P                  \        P                  4      ;_uu_ 4        VP                  R4       RRR4       V P                  \        P                  4      ;_uu_ 4        VP                  RRR4       RRR4       V P                  V\        P                  RR4      pV P                  VP                  R4       VP                  R4       V P                  V\        P                  RR4      pV P                  VP                  R4       R#   + '       g   i     L; i  + '       g   i     L; i)	z0new ConfigParser should have no defined sectionsr   z5new ConfigParser should have no acknowledged sectionsNr\   barrb   )r\   )r   r\   )r>   r   r   r   has_sectionr   rJ   r   r   r   	get_errorr   r   r   r   rC   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   :E&;E9&E6	9F		c                     VP                  W44       V P                  R VP                  : RVP                  : 24       R#   T d   pTu Rp?# Rp?ii ; i)zexpected exception type .N)r   failr%   r&   )r   rC   r   r   r   r   s   &&&&& r   r  BasicTestCase.get_errorG  sL    	<FF7# II)9)9; <  	H	s   A A	A
AAc                   V P                  R P                  V P                  ^ ,          R7      4      p\        ^^4       F|  pV P	                  VP                  RRV,          4      4       V P                  VP                  RRV,          4      4       V P                  \        VP
                  RRV,          4       K~  	  R# )z[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 MOREequalsBOOLTESTzt%dzf%dze%dN)	rD   r   r2   ranger   r   r   r   r   )r   rC   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           
     x   V P                  4       pVP                  R 4       V P                  \        P                  4      ;_uu_ 4       pVP                  R 4       RRR4       XP
                  pV P                  \        V4      R4       V P                  VP                  R4       V P                  '       EdH   V P                  \        P                  4      ;_uu_ 4       pVP                  \        P                  ! RP                  V P                  ^ ,          R7      4      RR7       RRR4       VP
                  pV P                  \        V4      R4       V P                  VP                  R4       V P                  \        P                  4      ;_uu_ 4       pVP!                  RR	R
RR//4       RRR4       VP
                  pV P                  \        V4      R4       V P                  VP                  R4       R# R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L~; i)r   NzSection 'Foo' already existsz                    [Foo]
                    will this be added{equals}True
                    [Bar]
                    what about this{equals}True
                    [Foo]
                    oops{equals}this won't
                r
  	<foo-bar>sourcezFWhile reading from '<foo-bar>' [line  5]: section 'Foo' already existsr   r   valOPTzis really `opt`zIWhile reading from '<dict>': option 'opt' in section 'Bar' already exists)r   NN)r   r     )r   r   z<dict>N)r>   r   r   rJ   r   r   r   strr   r7   rA   r   r   r   r2   r   r   )r   rC   r   r   s   &   r   test_weird_errorsBasicTestCase.test_weird_errorsi  s   ^^
u|AABBbNN5! CLLQ!?@!45;;;""<#E#EFF"x 0 F$//!"4F5 7 @K  L G ASV &O PQVV%<=""<#D#DEEeeUE;L%MNO FASV &M NQVV%CD)  CBB GF FEs%   	H A	HH)H	H&	)H9	c                   V P                  4       p\        P                  ! R P                  V P                  ^ ,          R7      4      pV P
                  '       dC   V P                  \        P                  4      ;_uu_ 4        VP                  V4       RRR4       MVP                  V4       V P                  VP                  RR4      R4       R#   + '       g   i     L4; i)z_            [Foo]
            x{equals}1
            y{equals}2
            y{equals}3
        r
  Nr   r  rv   )r>   r   r   r   r2   r7   r   rJ   r   rA   r   r   )r   rC   inis   &  r   %test_get_after_duplicate_option_error3BasicTestCase.test_get_after_duplicate_option_error  s    ^^oo 
 F$//!,F-/ ;;;""<#D#DEEs# FE NN3s+S1	 FEs   CC!	c                8   R P                  V P                  V P                  ^ ,          V P                  R7      pV P                  '       d
   VR,          pV P                  V4      pR	 F  p\        P                  ! 4       pVP                  WCR7       V P                  ^ ,          pV'       d   RP                  V4      pRP                  VV P                  R7      pV P                  '       d
   VR,          pV P                  VP                  4       V4       K  	  R# )
a8  [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
)commentr8   z![Valueless]
option-without-value
)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  r8   z"[Valueless]
option-without-value

N)TF)r   r2   r3   r8   r1   rD   r   r   writer   getvalue)r   r   rC   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                   V P                  R P                  V P                  ^ ,          R7      4      p ! R R\        4      pVP	                  RRR4       VP	                  RRV! R4      4       VP	                  RRR4       VP	                  RRV! R4      4       VP	                  RRR4       VP	                  RRR4       R# )	[sect]
option1{eq}foo
r   c                       ] tR tRtRtR# )2BasicTestCase.test_set_string_types.<locals>.mystri  r#   N)r$   r%   r&   r'   r)   r#   r   r   mystrr-    s    r   r.  sectoption1splatoption2N)rD   r   r2   r  r   )r   rC   r.  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                p   V P                   ^ ,          R8w  d   V P                  R4       \        P                  ! RRR7      pV P	                  4       pVP                  VR.RR7      pV P                  W1.4       V P                  VP                  R	R
4      R4       V P	                  4       pVP                  VRR7      pV P                  W1.4       V P                  VP                  R	R
4      R4       V P	                  4       pVP                  \        P                  ! V4      RR7      pV P                  W1.4       V P                  VP                  R	R
4      R4       V P	                  4       pVP                  \        P                  ! V4      V.RR7      pV P                  W1V.4       V P                  VP                  R	R
4      R4       V P	                  4       pVP                  R.RR7      pV P                  V. 4       V P	                  4       pVP                  . RR7      pV P                  V. 4       R# )r   rF   incompatible formatcfgparser.1r   r   nonexistent-filer   r   rR   r\   newbarN)
r2   skipTestr   r   r>   readr   r   r   FakePath)r   file1rC   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                   V P                   ^ ,          R8w  d   V P                  R4       \        P                  ! RRR7      P	                  4       pV P                  4       pVP                  VRR7      pV P                  W1.4       V P                  4       pVP                  RRR7      pV P                  V. 4       V P                  4       pVP                  VR.RR7      pV P                  W1.4       R	# )
r   rF   r6  r7  r   r   r   r   s   nonexistent-fileN)r2   r:  r   r   encoder>   r;  r   )r   file1_bytestringrC   r>  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                f    V P                  R P                  V P                  ^ ,          R7      4      # )ah  [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
  )rD   r   r2   r   s   &r   get_interpolation_config&BasicTestCase.get_interpolation_config  s1    *. +1&8J&*K1M 	Mr   c                   V P                  R P                  V P                  4      RR/R7      p\        VP	                  RRR/R7      4      pVP                  4        V P                  W14       V P                  \        P                  4      ;_uu_ 4        VP	                  R4       RRR4       R#   + '       g   i     R# ; i)	z
            [section]
            name {0[0]} %(value)s
            key{0[1]} |%(name)s|
            getdefault{0[1]} |%(default)s|
        default	<default>r   r   rb   rq   zno such sectionN)
rD   r   r2   r   r   r~   r   r   rJ   r   )r   r   rC   r   s   &&  r   check_items_config BasicTestCase.check_items_config)  s    __ 
 F4??#y+.F  H )7G*<=>	%|::;;HH&' <;;;s   B11C	c                   V P                  R P                  V P                  4      RR/R7      pV P                  VP	                  4       ^ ,          R4       V P                  VP	                  4       ^ ,          R4       V P                  VP	                  4       ^ ,          R4       V P                  \        4      ;_uu_ 4        VP	                  4        RRR4       R#   + '       g   i     R# ; i)
            [section1]
            name1 {0[0]} value1
            [section2]
            name2 {0[0]} value2
            [section3]
            name3 {0[0]} value3
        rJ  rK  r   section1section2section3N)rD   r   r2   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                4   V P                  R R/4      pV P                  VP                  V P                  R4      RR4       RRRR/VR&   V P                  VP	                  4       R.4       V P                  \        VR,          P                  4       4      0 R
m4       VP                  4        V P                  \        VP	                  4       4      \        4       4       V P                  \        WP                  ,          P                  4       4      R 04       R	# )r\   r   r   r   r0  value1r2  r   zingN>   r\   r0  r2  )r>   r   r   r8   r   r   r   clearr   s   & r   
test_clearBasicTestCase.test_clearE  s    ^^UEN+FF4''/N	P  9h?6
1RZ__./1NO

R[[]+SU3R 4 45::<=wGr   c                   V P                  R P                  V P                  4      RR/R7      pV P                  \	        VR,          P                  4       4      RR04       V P                  \	        VR,          P                  4       4      RR04       V P                  \	        VR	,          P                  4       4      R
R04       V P                  VR,          R,          R4       V P                  VR,          R,          R4       V P                  VR	,          R
,          R4       V P                  VP                  4       . RO4       RR/VR&   V P                  \	        VR,          P                  4       4      RR04       V P                  VR,          R,          R4       V P                  RVR,          4       V P                  VP                  4       . RO4       / VR	&   V P                  \	        VR	,          P                  4       4      R04       V P                  R
VR	,          4       V P                  VP                  4       . RO4       WP                  ,          WP                  &   V P                  \	        WP                  ,          P                  4       4      \	        4       4       / WP                  &   V P                  \	        WP                  ,          P                  4       4      \	        4       4       V P                  \	        VR,          P                  4       4      R04       V P                  \	        VR,          P                  4       4      R04       V P                  \	        VR	,          P                  4       4      \	        4       4       V P                  VP                  4       . RO4       VR,          VR&   V P                  \	        VR,          P                  4       4      R04       R# )rO  nameDvalueDr   rP  name1namedrQ  name2rR  name3rW  r   value3name22value22N)rP  rQ  rR  )
rD   r   r2   r   r   r   r   assertNotInr8   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                   V P                   '       d   V P                  R 4       \        P                  ! RP	                  V P
                  ^ ,          4      4      pV P                  4       pV P                  \        P                  4      ;_uu_ 4        VP                  V4       RRR4       V P                  VP                  RR4      R4       V P                  VR,          R,          R4       R#   + '       g   i     LT; i)z2if no_value is allowed, ParsingError is not raisedzC            [DEFAULT]
            test {0} test
            invalidNDEFAULTtest)r1   r:  r   r   r   r2   r>   r   rJ   r   rA   r   r   )r   invalidrC   s   &  r   test_invalid_multiline_value*BasicTestCase.test_invalid_multiline_valuew  s    MMNO// # vdooa01

 ^^|889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'  r3  r?  rD  rG  rL  rT  rZ  rh  rn  r)   r*   r+   s   @r   rO   rO   D   s     [-@A*FJX'9T&0PL/81"<D2E>24?l++B;$M6(
H$AL8 8r   rO   c                   2    ] tR tRt]P
                  tRtRtR# )StrictTestCasei  Tr#   N)	r$   r%   r&   r'   rJ   RawConfigParserr;   r7   r)   r#   r   r   rq  rq    s    //LFr   rq  c                   h   a  ] tR tRt o ]P
                  tR tR tR t	R t
R tR tR tR	 tR
tV tR# )ConfigParserTestCasei  c                   V P                  4       pV P                  pV! VP                  R R4      R4       V! VP                  R R4      R4       V! VP                  R R4      R4       V P                  V\        P
                  R R4      pV P                  \        P                  8X  d   V P                  VP                  R	4       R# R# )
r   r   z%something with interpolation (1 step)bar9z.something with lots of interpolation (9 steps)bar10z/something with lots of interpolation (10 steps)bar11N)rx  r   5something %(with11)s lots of interpolation (11 steps))	rG  r   r   r  rJ   InterpolationDepthErrorr9   rM   r   )r   rC   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                   V P                  4       pV P                  V\        P                  R R4      pV P	                  VP
                  R4       V P	                  VP                  R 4       V P	                  VP                  R4       V P                  \        P                  8X  d   V P	                  VP                  R4       R# R# )Interpolation Errorr   	referenceN)r   r~  z%(reference)sr  )rG  r  rJ   InterpolationMissingOptionErrorr   r  r   r   r9   rM   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                ,    V P                  . RO4       R# )rJ  N)rJ  rK  )
getdefaultz|<default>|)r   z|value|)r   rb   rL  r   s   &r   
test_itemsConfigParserTestCase.test_items  s     !4 	5r   c                4   V P                  R P                  V P                  ^ ,          R7      4      pV P                  VP	                  RR4      R4       V P
                  \        P                  8X  d%   V P                  VP	                  RR4      R4       R# R# )zc[section]
option1{eq}xxx
option2{eq}%(option1)s/xxx
ok{eq}%(option1)s/%%s
not_ok{eq}%(option2)s/%%sr+  r   okzxxx/%snot_okz
xxx/xxx/%sN)rD   r   r2   r   r   r9   rJ   rM   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                .   V P                  R P                  V P                  ^ ,          R7      4      pV P                  VP	                  RR4      R4       V P                  \        VP                  RRR4       V P                  \        VP                  RRR4       V P                  \        VP                  RRR4       V P                  VP	                  RR4      R4       VP                  RRR	4       V P                  VP	                  RR4      R
4       R# )r*  r+  r/  r0  r\   z%foozfoo%zf%oor2  zfoo%%barzfoo%barN)rD   r   r2   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                   V P                  R P                  V P                  ^ ,          R7      4      pV P                  \        VP
                  RR^4       V P                  \        VP
                  RRR4       V P                  \        VP
                  RR\        4       4       V P                  \        VP
                  RR^4       V P                  \        VP
                  RRR4       V P                  \        VP
                  RR\        4       4       V P                  \        VP
                  R^{R4       V P                  \        VP                  ^{4       R# )r*  r+  r/  r0  g      ?r2  zinvalid opt name!N)rD   r   r2   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                |    V P                  4       pV P                  \        VP                  V P                  4       R # r   )r>   r   r   r   r8   r   s   & r   test_add_section_default-ConfigParserTestCase.test_add_section_default  s*    ^^*bnnd6J6JKr   c                   V P                  ^R/R7      pV P                  WP                  ,          R,          R4       V P                  WP                  ,          P	                  R4      R4       V P                  RR/R7      pV P                  WP                  ,          R,          R4       V P                  WP                  ,          P	                  R4      R4       R	# )
zbpo-23835 fix for ConfigParserg      @r   rv   z2.5r   g      @r   z5.25N)r>   r   r8   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'   rJ   ConfigParserr;   r{  r  r  r  r  r  r  r  r)   r*   r+   s   @r   rt  rt    sC     ,,LJ	C5
H? :LM Mr   rt  c                      a  ] tR tRt o ]P
                  tRt]P                  ! R4      P                  4       tR tR tR tR tRtV tR# )	#ConfigParserTestCaseNoInterpolationi  Nz
        [numbers]
        one = 1
        two = %(one)s * 2
        three = ${common:one} * 3

        [hexen]
        sixteen = ${numbers:two} * 8
    c                   V P                  VR ,          R,          R4       V P                  VR ,          R,          R4       V P                  VR ,          R,          R4       V P                  VR,          R,          R	4       R
# )numbersonerv   twoz%(one)s * 2threez${common:one} * 3hexensixteenz${numbers:two} * 8N)r   r   s   &&r   assertMatchesIni4ConfigParserTestCaseNoInterpolation.assertMatchesIni  sh    Iu-s3Iu-}=Iw/1DEGY/1EFr   c                ^    V P                  V P                  4      pV P                  V4       R # r   )rD   r  r  r   s   & r   test_no_interpolation9ConfigParserTestCaseNoInterpolation.test_no_interpolation  s"    __TXX&b!r   c                f    V P                  4       pV P                  VP                  R 4      4       R# ) N)r>   assertIsNonerA   r   s   & r   test_empty_case3ConfigParserTestCaseNoInterpolation.test_empty_case  s%    ^^"..,-r   c                     ! R  R\         P                  4      pV! 4       pVP                  V P                  4       V P	                  V4       R# )c                       ] tR tRtRtRtR# )bConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation.<locals>.CustomConfigParseri  Nr#   )r$   r%   r&   r'   _DEFAULT_INTERPOLATIONr)   r#   r   r   CustomConfigParserr    s    %)"r   r  N)rJ   r  rA   r  r  )r   r  rC   s   &  r   "test_none_as_default_interpolationFConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation   s<    	*!:!: 	*  !
txx b!r   r#   )r$   r%   r&   r'   rJ   r  r;   r9   r   r   stripr  r  r  r  r  r)   r*   r+   s   @r   r  r    sN     ,,LM
//  	 
 G"." "r   r  c                   &   a  ] tR tRt o R tRtV tR# ),ConfigParserTestCaseInvalidInterpolationTypei  c           
     H   \         P                  ^*R3 Fc  pV P                  VR7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \         P
                  ! VR7       RRR4       RRR4       Ke  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)*   za string)rb   r9   N)rJ   ExtendedInterpolationsubTestr   r  r  )r   rb   s   & r   *test_error_on_wrong_type_for_interpolationWConfigParserTestCaseInvalidInterpolationType.test_error_on_wrong_type_for_interpolation	  sj    "882
KEE**&&y11 --EB 2 +* L11 +**s#   BA='B=BBB!r#   N)r$   r%   r&   r'   r  r)   r*   r+   s   @r   r  r    s     C Cr   r  c                   "    ] tR tRtRtRtRtRtR# ))ConfigParserTestCaseNonStandardDelimitersi  r#   Nz:=$//"r$   r%   r&   r'   r2   r3   r4   r)   r#   r   r   r  r        J")r   r  c                       ] tR tRtRtRtR# )-ConfigParserTestCaseNonStandardDefaultSectioni  generalr#   N)r$   r%   r&   r'   r8   r)   r#   r   r   r  r    s    Or   r  c                   n   a  ] tR tRt o ]P
                  tRP                  RR4      tR t	R t
R tRtV tR	# )
MultilineValuesTestCasei  zSI'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam! 	
c                   V P                  4       p\        ^d4       Fc  pRP                  V4      pVP                  V4       \        ^
4       F/  pVP	                  VRP                  V4      V P
                  4       K1  	  Ke  	  \        \        P                  RRR7      ;_uu_ 4       pVP                  V4       RRR4       R#   + '       g   i     R# ; i)d   z	section{}zlovely_spam{}wr   r   N)
r>   r  r   r   r   wonderful_spamr   r   TESTFNr"  )r   rC   r   sjr   s   &     r   setUpMultilineValuesTestCase.setUp   s    ^^sA""1%ANN12Yq/003T5H5HI  
 )""C'::aHHQK ;:::s   'CC	c                N    \         P                  ! \        P                  4       R # r   )osunlinkr   r  r   s   &r   tearDown MultilineValuesTestCase.tearDown*  s    
		)""#r   c                >   V P                  4       p\        \        P                  R R7      ;_uu_ 4       pVP	                  V4       RRR4       V P                  VP                  RR4      V P                  P                  RR4      4       R#   + '       g   i     LN; i)r   r   Nsection8lovely_spam4r  
)	r>   r   r   r  r   r   r   r  replace)r   cf_from_filer   s   &  r    test_dominating_multiline_values8MultilineValuesTestCase.test_dominating_multiline_values-  su     ~~')""W55""1% 6))*nE,,44VTB	D 65s   BB	r#   N)r$   r%   r&   r'   rJ   r  r;   r  r  r  r  r  r)   r*   r+   s   @r   r  r    s<     ,,L,-4WS&-A $D Dr   r  c                   P   a  ] tR tRt o ]P
                  tR tR tR t	R t
RtV tR# )RawConfigParserTestCasei7  c                   V P                  4       pV P                  pV! VP                  R R4      R4       V! VP                  R R4      R4       V! VP                  R R4      R4       V! VP                  R R4      R4       R	# )
r   r   z*something %(with1)s interpolation (1 step)rv  z3something %(with9)s lots of interpolation (9 steps)rw  z5something %(with10)s lots of interpolation (10 steps)rx  ry  N)rG  r   r   r   rC   r   s   &  r   r{  *RawConfigParserTestCase.test_interpolation:  s~    **,
266%7	9
266% @	B
266%!B	D
266%!B	Dr   c                ,    V P                  . RO4       R# )rJ  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                   V P                  4       pVP                  R 4       VP                  R R^4       VP                  R R. R
O4       VP                  R RRR/4       V P                  VP	                  R R4      ^4       V P                  VP	                  R R4      . R
O4       V P                  VP	                  R R4      RR/4       VP                  ^{4       VP                  ^{RR4       V P                  VP	                  ^{R4      R4       VP
                  \        P                  J d@   R Vn        VP                  R ^^4       V P                  VP	                  R ^4      ^4       R	# R	# )z
non-stringre   r   r:   pign!	@zthis is sickTc                     V # r   r#   )r  s   &r   <lambda>BRawConfigParserTestCase.test_set_nonstring_types.<locals>.<lambda>\  s    qr   N)r   r   r         r        )	r>   r   r   r   r   _dictrJ   rK   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                h   V P                  \        4      ;_uu_ 4       pV P                  ^R/R7       RRR4       XP                  pV P	                  \        V4      R4       V P                  RR/R7      pV P                  W0P                  ,          R,          R4       R#   + '       g   i     Lv; i)z-bpo-23835 legacy behavior for RawConfigParserg333333@r   Nz%'int' object has no attribute 'lower'r   g@r   )r   r   r>   r   r   r  r   r8   )r   ctxerrrC   s   &   r   r  -RawConfigParserTestCase.test_defaults_keyword`  s    ~..#NNQHN- /mmS#JK^^c3Z^0r"6"67<cB /.s   B!!B1	r#   N)r$   r%   r&   r'   rJ   rr  r;   r{  r  r  r  r)   r*   r+   s   @r   r  r  7  s,     //L
D99(C Cr   r  c                   "    ] tR tRtRtRtRtRtR# ),RawConfigParserTestCaseNonStandardDelimitersij  r#   Nr  r  r  r#   r   r   r  r  j  r  r   r  c                   J   a  ] tR tRt o ]P
                  tRtRtRt	R t
RtV tR# )RawConfigParserTestSambaConfip  Fc                   \         P                  ! R RR7      pV P                  4       pVP                  VR.RR7      pV P	                  W1.4       . ROpV P	                  VP                  4       V4       V P	                  VP                  RR4      R	4       V P	                  VP                  RR
4      ^24       V P	                  VP                  RR4      R4       V P	                  VP                  RR4      R4       R# )zcfgparser.2r   r   r8  r   r   globaltmp	workgroupMDKGROUPzmax log sizezhosts allowz127.zecho commandzcat %s; rm %sN)r  homesprinterszprint$zpdf-generatorr  Agustin)r   r   r>   r;  r   r   r   r   )r   smbconfrC   r>  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)rI   rH   z----)r  )r$   r%   r&   r'   rJ   rr  r;   r3   r4   r5   r  r)   r*   r+   s   @r   r  r  p  s.     //L)%!I Ir   r  c                      a  ] tR tRt o ]P
                  t]P                  ! 4       tRt	Rt
RR ltR tR tR tR	 tR
 tR tRtV tR# ))ConfigParserTestCaseExtendedInterpolationi  commonTNc                f    V P                  V4      pV'       d   W4n        VP                  V4       V# r   )r>   r  rA   )r   rB   r0   r  rC   s   &&&& r   rD   4ConfigParserTestCaseExtendedInterpolation.fromstring  s)    ^^H%(N
v	r   c                   V P                  \        P                  ! R 4      P                  4       4      pV P                  pV! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R	,          R
4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R	,          R
4       V! VR,          R,          R4       R# )a  
            [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 - paranoidN)rD   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                   V P                  \        P                  ! R 4      P                  4       4      pV P	                  \
        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P	                  \
        P                  4      ;_uu_ 4        VR,          R,           RRR4       R#   + '       g   i     LR; i  + '       g   i     R# ; i)z
            [one for you]
            ping = ${one for me:pong}

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

            [selfish]
            me = ${me}
        zone for youpingNselfishme)rD   r   r   r  r   rJ   rz  r   s   & r   test_endless_loop;ConfigParserTestCaseExtendedInterpolation.test_endless_loop  s    __X__ 	. 	 UW	 |CCDD}f% E|CCDDyM$ ED EDDDDs   B6C	6C		C	c                8   V P                  R 4      pV P                  VR,          R,          R4       V P                  VR,          R,          R4       V P                  VR,          R,          R4       \        P                  pV P	                  V4      ;_uu_ 4       pVR,          R,           R	R	R	4       V P                  XP
                  P                  R
4       V P                  VP
                  P                  ^,          R4       R	#   + '       g   i     Le; i)z
            [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$tryingNzdollars:${sickz${dollars:${sick}})rD   r   rJ   r  r   r   r  r   )r   rC   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   D		D	c                   \         P                  ! R 4      P                  4       pV P                  V4      pV P                  pV! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       V! VR	,          R
,          R4       V! VR	,          R,          R4       R# )aj  
            [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  optionlowerrb   OptionUpperValueCommona better valueA Better Valuerandomfoolowervalue redefinedFooUpperA Better Value RedefinedN)r   r   r  rD   r   r   r  rC   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                J   \         P                  ! R 4      P                  4       pV P                  \        P
                  4      ;_uu_ 4        V P                  V4      pRRR4       V P                  VR R7      pV P                  pV! VR,          R,          R4       V! VR,          R,          R4       V! VR	,          R,          R
4       V! VR	,          R,          R4       V! VR,          R,          R4       V! VR,          R,          R4       R#   + '       g   i     L; i)a8  
            [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
        Nc                     V # r   r#   )r   s   &r   r  [ConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts.<locals>.<lambda>  s    #r   )r  r  r   rb   r   r-  r.  r/  r0  r1  r\   r3  r   r5  )r   r   r  r   rJ   r   rD   r   r6  s   &   r   test_case_sensitivity_conflictsIConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts  s    oo   UW 	 |@@AA%B B __So_>
2h<!7+
2h<!7+
2h<!#34
2h<!#34
2h< 12
2h< :; BAs   DD"	c                   V P                  R 4      pV P                  \        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P                  \        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P                  \        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P                  \        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P                  \        P                  4      ;_uu_ 4        VR,          R,           RRR4       V P                  \
        4      ;_uu_ 4        RVR,          R	&   RRR4       R#   + '       g   i     ELE; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)
a   
            [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case1Ncase2case3case4case5zBLACK $ABBATHcase6)rD   r   rJ   InterpolationSyntaxErrorr  r   r   s   & r   test_other_errors;ConfigParserTestCaseExtendedInterpolation.test_other_errors  sM   __   |DDEE#$W- F|KKLL#$W- M|KKLL#$W- M|DDEE#$W- F|DDEE#$W- Fz**0?B#$W- +* FEELLLLLEEEE***sG   F9F9F.9G9G/G'F	F+	.F>	G	G$	'G8	r#   )NN)r$   r%   r&   r'   rJ   r  r;   r  r9   r8   r7   rD   r  r"  r(  r7  r<  rF  r)   r*   r+   s   @r   r  r    sU     ,,L 668MOF+'Z "E*A0<6@ @r   r  c                       ] tR tRtRtRtR# )ConfigParserTestCaseNoValuei/  Tr#   N)r$   r%   r&   r'   r1   r)   r#   r   r   rI  rI  /  s    Nr   rI  c                   R   a  ] tR tRt o ]P
                  ! 4       tRtR tR t	Rt
V tR# )NoValueAndExtendedInterpolationi3  Tc                    \         P                  ! R 4      pV P                  V4      pV P                  VR,          R,          R4       V P	                  VR,          R,          R4       R# )z@
            [dummy]
            a
            b = ${a}
        dummyr   Nr   r  )r   r   rD   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                    \         P                  ! R 4      pV P                  V4      pV P                  VR,          R,          R4       V P                  VR,          R,          R4       R# )zG
            [dummy]
            a = None
            b = ${a}
        rM  r   Noner   N)r   r   rD   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'   rJ   r  r9   r1   rN  rR  r)   r*   r+   s   @r   rK  rK  3  s'      668MN	/	3 	3r   rK  c                   .    ] tR tRt]P
                  tRtR# )/ConfigParserNoValueAndExtendedInterpolationTestiN  r#   N)r$   r%   r&   r'   rJ   r  r;   r)   r#   r   r   rU  rU  N  s      ,,Lr   rU  c                   .    ] tR tRt]P
                  tRtR# )2RawConfigParserNoValueAndExtendedInterpolationTestiU  r#   N)r$   r%   r&   r'   rJ   rr  r;   r)   r#   r   r   rW  rW  U  s      //Lr   rW  c                   T   a  ] tR tRt o ]P
                  tR0tR0tRt	R t
R tRtV tR# )	ConfigParserTestCaseTrickyFilei\  rF   rI   Tc           	     b   \         P                  ! R RR7      pV P                  4       pV P                  \	        VP                  VRR7      4      ^4       V P                  VP                  4       . RO4       V P                  VP                  V P                  RRR/R7      R4       V P                  \        4      ;_uu_ 4        VP                  V P                  RRRR/R7       RRR4       V P                  \	        VP                  RR4      P                  R4      4      ^4       V P                  \	        VP                  RR4      P                  R4      4      ^
4       RpV P                  VP                  VR4      4       V P                  VP                  VR4      R4       V P                  \	        VP                  R4      4      ^4       V P                  \         P"                  4      ;_uu_ 4        VP                  R	4       RRR4       V P                  VP                  R
R4      R4       V P                  VP                  R
R4      VP                  R
R4      4       V P                  VP                  RR4      R4       R#   + '       g   i     EL; i  + '       g   i     L; i)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-1rq   T)rawrr   Notherr  rb   zare they subsectionszlets use some Unicodeu	   片仮名letszdo thiszgo shopping)r[  r\  r]  r^  r_  r`  ra  )r   r   r>   r   r   r;  r   r   r8   r   r   r   splitr   r   r   rJ   r  )r   r   rC   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LHH%& M 6?K 6? 6=	? 4f=}M! +** MLs   "J
8J
J	J.	c                    \         P                  ! R RR7      pV P                  4       pV P                  \        4      ;_uu_ 4        VP                  VRR7       RRR4       R#   + '       g   i     R# ; i)r   r   r   asciir   N)r   r   r>   r   UnicodeDecodeErrorr;  )r   r   rC   s   &  r   test_unicode_failure3ConfigParserTestCaseTrickyFile.test_unicode_failure  sQ    !!-E^^122GGFWG- 3222   A$$A5	r#   N)r$   r%   r&   r'   rJ   r  r;   r2   r3   r1   rj  ro  r)   r*   r+   s   @r   rY  rY  \  s5     ,,LJuNN@. .r   rY  c                   :   a  ] tR tRt o RtRtR tR tR tRt	V t
R# )	Issue7005TestCasei  zjTest output when None is set() as a value and allow_no_value == False.

http://bugs.python.org/issue7005

z[section]
option = None

c                    V! R R7      pVP                  R4       VP                  RRR4       \        P                  ! 4       pVP	                  V4       VP                  4       # F)r1   r   r   N)r   r   r   r   r"  r#  )r   r;   cpr   s   &&  r   prepareIssue7005TestCase.prepare  sJ    /
y!
y(D)kkm
||~r   c                    \         P                  ! R R7      pVP                  R4       V P                  \        4      ;_uu_ 4        VP                  RRR4       RRR4       R#   + '       g   i     R# ; iru  )rJ   r  r   r   r  r   )r   rv  s   & r   test_none_as_value_stringified0Issue7005TestCase.test_none_as_value_stringified  sN    &&e<
y!y))FF9h- *)))rq  c                z    V P                  \        P                  4      pV P                  WP                  4       R # r   )rw  rJ   rr  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'   __doc__r}  rw  rz  r~  r)   r*   r+   s   @r   rs  rs    s%      5O.7 7r   rs  c                   *   a  ] tR tRt o ]tR tRtV tR# )SortedTestCasei  c                    V P                  R 4      p\        P                  ! 4       pVP                  V4       V P	                  VP                  4       R4       R# )z [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

N)rD   r   r   r"  r   r#  )r   rC   r$  s   &  r   test_sortedSortedTestCase.test_sorted  sJ    __ % & 
*&	'r   r#   N)	r$   r%   r&   r'   r   r6   r  r)   r*   r+   s   @r   r  r    s     I' 'r   r  c                   F   a  ] tR tRt o ]P
                  tRtRtR t	Rt
V tR# )CompatibleTestCasei  z#;rH   c                    \         P                  ! R 4      pV P                  V4      pV P                  VP	                  RR4      R4       V P                  VP	                  RR4      R4       V P                  VP	                  RR4      R4       R# )	z        [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!rZ   r[   quirkzthis;is not a commentN)r   r   rD   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'   rJ   rr  r;   r3   r4   r  r)   r*   r+   s   @r   r  r    s&     //L!2 2r   r  c                   B   a  ] tR tRt o ]P
                  tRR ltRtV t	R# )CopyTestCasei  Nc                h   V P                  V4      pVP                  V4       V P                  4       pVP                  V4       VP                  4        FZ  pVP                  V P
                  8X  d   K   W0P
                  ,          P                  4        F  w  rgWV,          V8X  g   K  WV K  	  K\  	  V# r   )r>   rA   r   r   r   r8   r   )r   rB   r0   rC   cf_copyr   rJ  rb   s   &&&     r   rD   CopyTestCase.fromstring  s    ^^H%
v.."" ~~'G||t333"$%9%9":"@"@"B#u,( #C ( r   r#   r   )
r$   r%   r&   r'   rJ   r  r;   rD   r)   r*   r+   s   @r   r  r    s     ,,L r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )FakeFilei  c                    \         P                  ! R RR7      p\        VRR7      ;_uu_ 4       pVP                  4       V n        V P                  P                  4        RRR4       R#   + '       g   i     R# ; i)r7  r   r   r   r   N)r   r   r   	readlineslinesreverse)r   	file_pathr   s   &  r   __init__FakeFile.__init__  sO    $$]<H	)g..!DJJJ  /...s   0A((A9	c                p    \        V P                  4      '       d   V P                  P                  4       # R # )r  )r   r  popr   s   &r   r   FakeFile.readline  s#    tzz??::>>##r   )r  N)r$   r%   r&   r'   r  r   r)   r*   r+   s   @r   r  r    s     ! r   r  c              #  j   "   V P                  4       pV'       d   Vx  V P                  4       pK  R# 5i)z+As advised in Doc/library/configparser.rst.N)r   )r   lines   & r   readline_generatorr    s(     ::<D

zz| s   33c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	ReadFileTestCasei  c                    \         P                  ! R RR7      .p VP                  V^ ,          P                  R4      4       V F  p\
        P                  ! 4       p\        VRR7      ;_uu_ 4       pVP                  V4       RRR4       V P                  RV4       V P                  RVR,          4       V P                  VR,          R,          R	4       K  	  R#   \         d     Li ; i  + '       g   i     Lr; i)
r7  r   r   utf8r   r   NrR   r\   r9  )r   r   r}   rB  UnicodeEncodeErrorrJ   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'22a  # 3MM)V,MM%	!23VI.u5x@ $ " 		 32s   'C 1C-C*)C*-C=c                N   \         P                  ! R 4      P                  4       P                  R4      p\        P
                  ! 4       pVP                  V4       V P                  RV4       V P                  RVR,          4       V P                  VR,          R,          R4       R# )z%
        [Foo Bar]
        foo=newbarr  rR   r\   r9  N)	r   r   r  rh  rJ   r  r   r  r   )r   r  r   s   &  r   test_iterableReadFileTestCase.test_iterable
  s     ! uwuuT{ 	 **,i(eVI./	*518<r   c                   \         P                  ! 4       pV P                  \        4      ;_uu_ 4        VP	                  \        4       4       RRR4       VP	                  \        \        4       4      4       V P                  RV4       V P                  RVR,          4       V P                  VR,          R,          R4       R#   + '       g   i     L; i)zIssue #11670.NrR   r\   r9  )	rJ   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   CC	c                $   \         P                  ! R4      P                  4       P                  R4      p\        P
                  ! 4       pV P                  \        P                  4      ;_uu_ 4       pVP                  VRR7       RRR4       V P                  \        XP                  4      R4       \         P                  ! R4      P                  4       P                  R4      p\        P
                  ! 4       pV P                  \        P                  4      ;_uu_ 4       pVP                  VRR7       RRR4       V P                  \        VP                  4      R4       \         P                  ! R	4      P                  4       P                  R4      p\        P
                  ! 4       pV P                  \        P                  4      ;_uu_ 4       pVP                  VRR7       RRR4       V P                  \        VP                  4      R
4       \         P                  ! R4      P                  4       P                  R4      p\        P
                  ! 4       pV P                  \        P                  4      ;_uu_ 4       pVP                  VRR7       RRR4       V P                  \        VP                  4      R4       R#   + '       g   i     ELH; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     Ls; i)zIssue #18260.z"
        [badbad]
        [badbad]r  s   badbadr  NzGWhile 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  rh  rJ   r  r   r   r   r   r  r   r   r   r   r   r  r   dses   &   r   test_source_as_bytes%ReadFileTestCase.test_source_as_bytes  sP    ! UWUU4[ 	 **,|AABBcU95 C	

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

  ! %'%%+ 	 **,|8899SU95 :M	
  ! egeeDk 	 **,|EEFF#U95 G	
G CBB BAA :99 GFs0   0K KK+ K?K	K(	+K<	?L	c                6   . ROp\         P                  ! RRRRRR7      pV P                  \         P                  4      ;_uu_ 4       pVP	                  V4       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)	[SECT]
r  TFN)r3   r1   r7   r2   r9   zZKey without value continued with an indented line.
file: '<???>', line: 3
' KEY2 = VAL2\n')r  zKEY1
z KEY2 = VAL2
)rF   )rJ   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GG3U# H 	
 HGs   BB	r#   N)r$   r%   r&   r'   r  r  r  r  r  r)   r*   r+   s   @r   r  r    s%     A==-
^
 
r   r  c                   H   a  ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )CoverageOneHundredTestCaseif  z"Covers edge cases in the codebase.c                   \         P                  ! R R4      pV P                  VP                  R 4       V P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  \        V4      R4       R# )r   r   Nz3Option 'option' in section 'section' already exists)r   r   NN)	rJ   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                    \         P                  ! R RR4      pV P                  VP                  R4       V P                  VP                  R 4       V P                  VP
                  R4       R# )r   r   rawvalN)r   r   r  )rJ   rz  r   r   r   r   r  s   & r   test_interpolation_depth_error9CoverageOneHundredTestCase.test_interpolation_depth_errors  sV    44Xy5=?%DEx0	2r   c                l   V P                  \        4      ;_uu_ 4       p\        P                  ! 4        R R R 4       \        P                  ! RR7      pV P	                  VP
                  R4       \        P                  ! R4      pV P	                  VP
                  R4       R #   + '       g   i     Lw; i)Nr  r  )r   r  rJ   r   r   r  )r   r   r   s   &  r   test_parsing_error-CoverageOneHundredTestCase.test_parsing_errorz  sw    y))R%%' *)):x0))(3x0 *)s   B##B3	c                2   \         P                  ! 4       pVP                  R 4       V P                  \         P                  4      ;_uu_ 4       pVR,          R,           RRR4       V P                  \        XP                  4      R4       V P                  \         P                  4      ;_uu_ 4       pVR,          R,           RRR4       V P                  \        VP                  4      R4       R#   + '       g   i     L; i  + '       g   i     LJ; i)z
            [section]
            invalid_percent = %
            invalid_reference = %(()
            invalid_variable = %(does_not_exist)s
        r   invalid_percentNz.'%' must be followed by '%' or '(', found: '%'invalid_referencez+bad interpolation variable reference '%(()')rJ   r  rA   r   rE  r   r  r   r   r   r   s   &  r   test_interpolation_validation8CoverageOneHundredTestCase.test_interpolation_validation  s    **,  	 |DDEE9/0 FR\\* -> 	?|DDEE912 FR\\* -? 	@ FE FEs   C33D3D	D	c                    \         P                  ! 4       pVP                  R 4       V P                  \	        VR,          4      R4       R# )z7
            [section]
            key = value
        r   z<Section: section>N)rJ   r  rA   r   reprr  s   & r   test_sectionproxy_repr1CoverageOneHundredTestCase.test_sectionproxy_repr  s@    **,  	 	fY/02FGr   c                   \         P                  ! 4       p^ RIpVP                  VP                  R&   VP                  R4       V P                  RVP                  4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V=V P                  \        4      ;_uu_ 4        VP                  RR4       RRR4       V P                  RVP                  4       VP                  R V P                  RVP                  4       V P                  \        4      ;_uu_ 4        VP                  RR4       RRR4       V P                  \        4      ;_uu_ 4        VR,          P                  R4       RRR4       V P                  \        4      ;_uu_ 4        VR,          P                  R4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)r   NdecimalzS
            [s1]
            one = 1
            [s2]
            two = 2
        s1r  s2r  )rJ   r  r  Decimal
convertersrA   r  r   
getdecimalr   r   rf  )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   H)H=II#)H:	=I	I 	#I4	r#   N)r$   r%   r&   r'   r  r  r  r  r  r  r  r)   r*   r+   s   @r   r  r  f  s-     ,731@"H+ +r   r  c                   f   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tRtV tR# )ExceptionPicklingTestCasei  zBTests for issue #13760: ConfigParser exceptions are not picklable.c                X   ^ RI p\        P                  ! R4      p\        VP                  ^,           4       Fo  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  \        V4      \        V4      4       Kq  	  R# )r   Nrb   )
picklerJ   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                   ^ RI p\        P                  ! R4      p\        VP                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# )r   Nr   )r  rJ   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                >   ^ RI p\        P                  ! RR4      p\        VP                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# )r   Nr   r   )r  rJ   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                   ^ RI p\        P                  ! RR^{4      p\        VP                  ^,           4       EF  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       EK  	  R# )r   Nr   r  )r  rJ   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                   ^ RI p\        P                  ! RRR^{4      p\        VP                  ^,           4       EF.  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       EK1  	  R# )r   Nr   r   r  )r  rJ   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                @   ^ RI p\        P                  ! RRR4      p\        VP                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# r   Nr   r   msg)r  rJ   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                   ^ RI p\        P                  ! RRRR4      p\        VP                  ^,           4       EF  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       EK  	  R# )r   Nr   r   r  r  )r  rJ   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                @   ^ RI p\        P                  ! RRR4      p\        VP                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# r  )r  rJ   rE  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                @   ^ RI p\        P                  ! RRR4      p\        VP                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# )r   Nr   r   r  )r  rJ   rz  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                B   ^ RI p\        P                  ! R4      pVP                  ^R4       VP                  ^R4       VP                  ^R4       \	        VP
                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  \        P                  ! R4      pVP                  ^R4       VP                  ^R4       VP                  ^R4       \	        VP
                  ^,           4       F  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       K  	  R# )r   Nr  line1line2line3filename)r  rJ   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                   ^ RI p\        P                  ! R^{R4      p\        VP                  ^,           4       EF  pVP                  W#4      pVP                  V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       EK  	  R# )r   Nr
  r  )r  rJ   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+   s   @r   r  r    sD     L1	1
111
11
11161 1r   r  c                   *   a  ] tR tRt o RtR tRtV tR# )InlineCommentStrippingTestCaseiS  zyTests for issue #14590: ConfigParser doesn't strip inline comment when
delimiter occurs earlier without preceding space..c                n   \         P                  ! RR7      pVP                  R4       VR,          pV P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R	4       V P                  VR
,          R4       V P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R4       VR,          pV P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R4       R# )rH   )r4   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 v3N)rH   rI   r  )rJ   r  rA   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+   s   @r   r  r  S  s     :B Br   r  c                   B   a  ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
ExceptionContextTestCaseiw  zJTest that implementation details doesn't leak
through raising exceptions. c                L   \         P                  ! 4       pVP                  R 4       V P                  \         P                  4      pV;_uu_ 4        VP                  RR4       RRR4       V P                  VP                  P                  R4       R#   + '       g   i     L8; i)z
        [Paths]
        home_dir: /Users
        my_dir: %(home_dir1)s/lumberjack
        my_pictures: %(my_dir)s/Pictures
        Pathsmy_dirNT)	rJ   r  rA   r   r  r   r   r   __suppress_context__r  s   &  r   test_get_basic_interpolation5ExceptionContextTestCase.test_get_basic_interpolation{  ss    **,  	 |KKLRJJw) bll77> Rs   BB#	c                v   \         P                  ! \         P                  ! 4       R 7      pVP                  R4       V P	                  \         P
                  4      pV;_uu_ 4        VP                  RR4       RRR4       V P                  VP                  P                  R4       R#   + '       g   i     L8; i)r  z
        [Paths]
        home_dir: /Users
        my_dir: ${home_dir1}/lumberjack
        my_pictures: ${my_dir}/Pictures
        r$  r%  NT)
rJ   r  r  rA   r   r  r   r   r   r&  r  s   &  r   test_get_extended_interpolation8ExceptionContextTestCase.test_get_extended_interpolation  s    **$::<>  	 |KKLRJJw) bll77> Rs   %B((B8	c                F   \         P                  ! 4       pVP                  R 4       V P                  \         P                  4      ;_uu_ 4       pVP                  R4       RRR4       V P                  XP                  P                  R4       R#   + '       g   i     L8; i)z2
        [Paths]
        home_dir: /Users
        rl  NT)	rJ   r  rA   r   r   r   r   r   r&  r  s   &  r   test_missing_options-ExceptionContextTestCase.test_missing_options  sp    **,  	 |::;;rNN6" <bll77> <;s   BB 	c                (   \         P                  ! 4       pV P                  \         P                  4      ;_uu_ 4       pVP	                  R RR4       RRR4       V P                  XP                  P                  R4       R#   + '       g   i     L8; i)Section1an_int15NT)rJ   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   BB	c                &   \         P                  ! 4       pV P                  \         P                  4      ;_uu_ 4       pVP	                  R R4       RRR4       V P                  XP                  P                  R4       R#   + '       g   i     L8; i)r0  r1  NT)rJ   r  r   r   r   r   r   r&  r3  s   &  r   test_remove_option+ExceptionContextTestCase.test_remove_option  s_    **,|::;;r  X6 <bll77> <;s   B  B	r#   N)r$   r%   r&   r'   r  r'  r*  r-  r4  r7  r)   r*   r+   s   @r   r"  r"  w  s(     $????? ?r   r"  c                   X   a a ] tR tRt oRt]P                  tRV 3R lltR t	Rt
VtV ;t# )ConvertersTestCasei  z Introduced in 3.5, issue #18159.c                H   < \         SV `  VR 7      pR VP                  R&   V# )r   c                     V P                  4        Uu. uF+  pVP                  4       '       g   K  VP                  4       NK-  	  up# u upi r   )rh  r  )vr   s   & r   r  .ConvertersTestCase.newconfig.<locals>.<lambda>  s6    AGGI 1?Iq45GGI 2;I 1? 1?s
   AAr   )superr>   r  )r   r0   r=   	__class__s   && r   r>   ConvertersTestCase.newconfig  s,    7$h$7'?F#r   c                   V P                  4       pV P                  R VP                  4       V P                  RVP                  4       V P                  VP                  R,          4       V P                  VP                  R,          4       V P                  VP                  R ,          4       V P	                  VP                  R,          4       V P                  \        VP                  4      ^4       V P                  \        4      ;_uu_ 4        R VP                  R&   RRR4       V P                  \        4      ;_uu_ 4        R VP                  R&   RRR4       VP                  R4       VR	,          pV P                  VR
,          R4       V P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R4       V P                  VP                  R	R
4      R4       V P                  VP                  R	R4      R4       V P                  VP                  R	R4      R4       V P                  VP                  R	R4      R4       V P                  VP                  R	R4      R4       V P                  VP                  R	R
4      R4       V P                  VP                  R	R4      ^4       V P                  VP                  R	R4      R4       V P                  VP                  R	R4      . RO4       V P                  VP                  R	R4      R4       V P                  VP                  R
4      R4       V P                  VP                  R4      ^4       V P                  VP                  R4      R4       V P                  VP                  R4      . RO4       V P                  VP                  R4      R4       V P                  \        4      ;_uu_ 4        VP!                  R	R4       RRR4       V P                  \        4      ;_uu_ 4        VP!                  R4       RRR4       ^ RIpVP$                  VP                  R&   V P                  RVP                  4       V P	                  VP                  R,          4       V P                  \        VP                  4      ^4       VP%                  R4      pV P                  VP!                  R	R4      V4       V P                  VP!                  R4      V4       VP                  R V P'                  RVP                  4       V P                  \        VP                  4      ^4       V P                  \        4      ;_uu_ 4        VP!                  R	R4       RRR4       V P                  \        4      ;_uu_ 4        VP!                  R4       RRR4       V P                  \(        4      ;_uu_ 4        VP                  R RRR4       V P                  \(        4      ;_uu_ 4        VP                  R RRR4       V P                  \(        4      ;_uu_ 4        VP                  R RRR4       R#   + '       g   i     ELv; i  + '       g   i     ELT; i  + '       g   i     EL; i  + '       g   i     ELy; i  + '       g   i     EL3; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)ri   r   re   rg   c                     V # r   r#   r=  s   &r   r  4ConvertersTestCase.test_converters.<locals>.<lambda>  s    1r   r  Nc                     V # r   r#   rD  s   &r   r  rE    s    Qr   z~
        [s]
        str = string
        int = 1
        float = 0.5
        list = a b c d e f g
        bool = yes
        r  r  rB   rv   z0.5za b c d e f gboolrt   g      ?Tr  )r   r   cdr   r   g)r>   r  r  r  assertIsNotNoner   r   r   r   rA   r   r   r   getlistr   r   r  r  r  rf  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   Z	Z%Z9[$[![5\	\9\/Z"	%Z6	9[
	[	![2	5\		\	\,	/] 	r#   r   )r$   r%   r&   r'   r  rJ   r  r;   r>   rN  r)   r*   __classcell__r@  r,   s   @@r   r:  r:    s$     *,,LD% D%r   r:  c                   @   a  ] tR tRt o RtRtR tR tR tR t	Rt
V tR	# )
!BlatantOverrideConvertersTestCasei  zyWhat if somebody overrode a getboolean()? We want to make sure that in
this case the automatic converters do not kick in.z
        [one]
        one = false
        two = false
        three = long story short

        [two]
        one = false
        two = false
        three = four
    c                    \         P                  ! R \        /R7      pVP                  V P                  4       V P                  V4       V P                  VP                  R ,          4       R# )r   )r  N)rJ   r  r   rA   r   	_test_lenrK  r  r   r  s   & r   test_converters_at_init9BlatantOverrideConvertersTestCase.test_converters_at_init  sI    ''E3<@$sS^^E23r   c                $    ! R  R\         P                  4      pV! 4       pVP                  V P                  4       V P	                  V4       V P                  VP                  R,          4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       VP                  VP                  R&   V P                  VP                  RR4      4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       V P                  VP                  RR4      4       R# )c                      a a ] tR tRt oRtRRRRR]P                  /V 3R lltRRRRR]P                  /R	 ltR
t	Vt
V ;t# )OBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParseri  z0a historic borough in south central Pennsylvaniard  Frr   Nrp   c               8   < W8X  d   R # \         SV `  WW4VR7      # )Trd  rr   rp   )r?  r   )r   r   r   rd  rr   rp   r@  s   &&&$$$r   r   ZBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getboolean  s*    $w)'s3; * = =r   c          	     4    V P                  W\        W4VR 7      # )r]  )	_get_convr   )r   r   r   rd  rr   rp   s   &&&$$$r   getlenVBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getlen  s!    ~~gs/7 & 9 9r   r#   )r$   r%   r&   r'   
gettysburgrJ   rM   r   ra  r)   r*   rP  rQ  s   @@r   StrangeConfigParserr[    sQ     KJ= =T =!-!4!4=9U 9 9 , 3 39 9r   rd  r   r  r  ri   N)rJ   r  rA   r   rU  r  r  r   r   r   _convert_to_boolean)r   rd  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                   V P                  \        VP                  4      ^4       V P                  RVP                  4       V P                  RVP                  4       V P	                  RVP                  4       V P                  VP                  R,          4       V P                  VP                  R,          4       V P                  VP                  R,          4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VP                  RR4      ^4       V P                  VP                  RR	^ R
7      ^ 4       V P                  \        P                  4      ;_uu_ 4        VP                  RR	4       RRR4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R4      ^4       V P                  VR,          P                  R	^ 4      ^ 4       V P                  VR,          P                  R	4      R4       R#   + '       g   i     ELT; i)   ri   r   tysburgre   rg   r  r  r  fourro   N)
r   r   r  r  rf  r  ra  r   rJ   r   rV  s   &&r   rU  +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   7MM&	c                t  a \         P                  ! 4       oR  Sn        V3R lSn        SP	                  V P
                  4       V P                  \        SP                  4      ^4       V P                  RSP                  4       V P                  RSP                  4       V P                  SP                  R,          4       V P                  SP                  R,          4       V P                  SP                  R,          4       V P                  SP                  RR4      4       V P                  SP                  RR4      4       V P                  SP                  RR4      4       V P                  SP                  RR4      4       SP                  SP                  R&   V P                  SP                  RR4      4       V P                  SP                  RR4      4       V P                  SP                  RR4      4       V P                  SP                  RR4      4       V P                  SP                  RR4      ^4       V P                  SP                  RR4      ^4       V P                  SP                  RR4      ^4       V P                  SP                  RR4      ^4       V P                  SP                  RR4      ^4       V P                  SP                  RR4      ^4       V P                  \         4      ;_uu_ 4        V P                  SR,          P                  R4      ^4       R	R	R	4       V P                  \         4      ;_uu_ 4        V P                  SR,          P                  R4      ^4       R	R	R	4       R	#   + '       g   i     L`; i  + '       g   i     R	# ; i)
c                     R # )Tr#   )r   r   s   &&r   r  LBlatantOverrideConvertersTestCase.test_instance_assignment.<locals>.<lambda>N  s    r   c                 6   < \        SV ,          V,          4      # r   )r   )r   r   r  s   &&r   r  ro  O  s    SWf1E-Fr   ri   r   re   rg   r  r  r  N)rJ   r  r   ra  rA   r   r   r   r  r  rf  r  r   re  r   r   r   rV  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   )N )N&N#	&N7	r#   N)r$   r%   r&   r'   r  r   rW  rf  rU  rq  r)   r*   r+   s   @r   rS  rS    s*     :
F47::4: :r   rS  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )SectionlessTestCasein  c                V    \         P                  ! R R7      pVP                  V4       V# )Tallow_unnamed_section)rJ   r  rA   )r   rB   r  s   && r   rD   SectionlessTestCase.fromstringp  s#    ''dC
r   c                &   V P                  R 4      pV P                  \        \        P                  R.4      \        VP                  4       4      4       V P                  RV\        P                  ,          R,          4       V P                  RV\        P                  ,          R,          4       V P                  RVR,          R,          4       \        P                  ! 4       pVP                  V4       V P                  VP                  4       4      pV P                  RV\        P                  ,          R,          4       V P                  RV\        P                  ,          R,          4       V P                  RVR,          R,          4       R# )	zC
        a = 1
        b = 2
        [sect1]
        c = 3
        sect1rv   r   rx   r   3rH  N)
rD   r   r   rJ   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                   V P                  R 4      pV P                  \        P                  .VP	                  4       4       V P                  RV\        P                  ,          R,          4       V P                  RV\        P                  ,          R,          4       \
        P                  ! 4       pVP                  V4       V P                  VP                  4       4      pV P                  \        P                  .VP	                  4       4       V P                  RV\        P                  ,          R,          4       V P                  RV\        P                  ,          R,          4       R# )z%
        a = 1
        b = 2
        rv   r   rx   r   N)	rD   r   rJ   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                    \         P                  ! R R7      pVP                  \         P                  4       VP                  R4       \        P
                  ! 4       pVP                  V4       V P                  VP                  4       R4       R# )Trv  r   z[section]

N)	rJ   r  r   r|  r   r   r"  r   r#  r   r  r$  s   &  r   test_empty_unnamed_section.SectionlessTestCase.test_empty_unnamed_section  s^    ''dC445	"		&*O<r   c                   \         P                  ! R R7      pVP                  \         P                  4       VP	                  \         P                  RR4       V P                  RV\         P                  ,          R,          4       R# )Trv  r   rv   N)rJ   r  r   r|  r   r   rV  s   & r   test_add_section$SectionlessTestCase.test_add_section  sZ    ''dC445,,c37c,">">?DEr   c                   V P                  \        P                  4      ;_uu_ 4        \        P                  ! 4       P	                  R 4       RRR4       V P                  \        P
                  4      ;_uu_ 4        \        P                  ! 4       P                  \        P                  4       RRR4       R#   + '       g   i     Lt; i  + '       g   i     R# ; i)a = 1N)r   rJ   r   r  rA   UnnamedSectionDisabledErrorr   r|  r   s   &r   test_disabled_error'SectionlessTestCase.test_disabled_error  s    |EEFF%%'33G< G |GGHH%%'33L4P4PQ IH GF IHHs   %B9<3C9C		C	c                   \         P                  ! R R7      pVP                  R4       VP                  R4       V P                  \         P                  .VP                  4       4       V P                  RV\         P                  ,          R,          4       V P                  RV\         P                  ,          R,          4       R# )	Trv  r  zb = 2rv   r   rx   r   N)rJ   r  rA   r   r|  r   rV  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'   rD   r  r  r  r  r  r  r)   r*   r+   s   @r   rt  rt  n  s2     
2,G$=FRF Fr   rt  c                   0   a  ] tR tRt o RtR tR tRtV tR# )InvalidInputTestCasei  zTests for issue #65697, where configparser will write configs
it parses back differently. Ex: keys containing delimiters or
matching the section patternc                n   \         P                  ! R R7      pVP                  R4       VP                  RRR4       \        P
                  ! 4       pV P                  \         P                  4      ;_uu_ 4        VP                  V4       RRR4       VP                  4        R#   + '       g   i     L"; i)rF   )r2   rP  za=brH  N
rJ   r  r   r   r   r   r   InvalidWriteErrorr"  closer  s   &  r   test_delimiter_in_key*InvalidInputTestCase.test_delimiter_in_key  ss    ''C9
#
E3'|==>>IIf ? ?>s   8B$$B4	c                j   \         P                  ! 4       pVP                  R 4       VP                  R RR4       \        P
                  ! 4       pV P                  \         P                  4      ;_uu_ 4        VP                  V4       RRR4       VP                  4        R#   + '       g   i     L"; i)rP  z[this parses back as a section]r\   Nr  r  s   &  r   test_section_bracket_in_key0InvalidInputTestCase.test_section_bracket_in_key  sr    '')
#
=uE|==>>IIf ? ?>s   6B""B2	r#   N)	r$   r%   r&   r'   r  r  r  r)   r*   r+   s   @r   r  r    s     $ r   r  c                   &   a  ] tR tRt o R tRtV tR# )MiscTestCasei  c                B    \         P                  ! V \        R 0R7       R# )r  )not_exportedN)r   check__all__rJ   r   s   &r   test__all__MiscTestCase.test__all__  s    T<wiHr   r#   N)r$   r%   r&   r'   r  r)   r*   r+   s   @r   r  r    s     I Ir   r  __main__)1collectionsrJ   r   r  r   unittestrl  r   test.supportr   UserDictr   r.   rO   TestCaserq  rt  r  r  r  r  r  r  r  r  r  rI  rK  rU  rW  rY  rs  r  r  r  r  r  r  r  r  r  r"  r:  rS  rt  r  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:^KF(++ KF\8,, 0I8$$ I
 zMMO r   