python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_configparser.cpython-311.opt-1.pyc

ezYddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZGddejZ
GddZGdd	eZGd
deejZGdd
eejZGddeejZGddeZGddejZGddeZGddeZGddeejZGddeejZGddeZGddeejZGd d!eejZGd"d#eZGd$d%eejZGd&d'ejZGd(d)eZ Gd*d+eejZ!Gd,d-eejZ"Gd.d/Z#d0Z$Gd1d2ejZ%Gd3d4ejZ&Gd5d6ejZ'Gd7d8ejZ(Gd9d:ejZ)Gd;d<eejZ*Gd=d>ejZ+Gd?d@ejZ,e-dAkrej.dSdS)BN)support)	os_helperc6eZdZdZdZdZdZdZdZeZ	dS)
SortedDictcNt|jSN)sorteddataitemsselfs J/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_configparser.pyrzSortedDict.itemssdioo''(((cNt|jSr)r	r
keysrs rrzSortedDict.keyssdinn&&'''rc>d|DS)Ncg|]
}|dS)).0is  r
<listcomp>z%SortedDict.values.<locals>.<listcomp>s+++!+++r)rrs rvalueszSortedDict.valuess++djjll++++rcDt|Sr)iterrrs r	iteritemszSortedDict.iteritemssDJJLL!!!rcDt|Sr)rrrs riterkeyszSortedDict.iterkeyssDIIKK   rcDt|Sr)rrrs r
itervalueszSortedDict.itervaluessDKKMM"""rN)
__name__
__module____qualname__rrrrrr __iter__rrrrrso)))(((,,,"""!!!###HHHrrc`eZdZdZdZdZdZdZej	Z
dZejZ
ejZddZddZdS)	CfgParserTestCaseClassF)=:);#TNct||j|j|j|j|j|j|j|j|j	

}|j
di|}|S)N)
defaultsallow_no_value
delimiterscomment_prefixesinline_comment_prefixesempty_lines_in_values	dict_typestrictdefault_section
interpolationr)dictr-r.r/r0r1r2r3r4r5config_class)r
r,	argumentsinstances    r	newconfigz CfgParserTestCaseClass.newconfig0sk.!2$($@"&"<n; 0,


	%4$11y11rcZ||}|||Sr)r:read_string)r
stringr,cfs    r
fromstringz!CfgParserTestCaseClass.fromstring@s*
^^H
%
%
v	rr)r!r"r#r-r.r/r0r1configparser
_default_dictr2r3DEFAULTSECTr4_UNSETr5r:r?rrrr&r&%suNJ!( *I
F".O 'M rr&ceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdS)
BasicTestCasec(gd}|jr|d|ddg}|}||j}||||d}||||d|D}|||j|||||d}tt|}||||}tt|}|t|t||D]\}}|||j
||||j||ddd	||d
dd||ddd||dd
d||ddd||dd
d||ddd||ddd||
ddd||ddd||ddd||ddd||ddd||ddd ||d!d"d#|jr ||dd$d||ddd
%d	||dddd
i&d
|t$j5|d'ddddn#1swxYwY|t$j5|dd(dddn#1swxYwY||d'dd
%d
||dd(d
%d
||d
dd%d||d)dd%d||
ddd*%d||
dd+d*%d*||
dd+d,%d,|t$j5|
dd+dddn#1swxYwY||ddd-%d||dd.d-%d-||dd.d/%d/|t$j5|dd.dddn#1swxYwY||ddd0%d||dd1d2%d2||dd1d0%d0|t$j5|dd1dddn#1swxYwY||d3dd0%d0|jrD||dd$d%d||dd4d%d||ddd	||d
dd|d}||j
d||j||t.5d5|_
dddn#1swxYwY|t.5d6|_dddn#1swxYwY||dd||d
d||ddd||dd
d||ddd||ddd||d7dd8|jr||dd$d||ddd
d	||ddd
%d	||dddd
i&d
|t05|d'ddddn#1swxYwY|t05|dd(dddn#1swxYwY|t05|d'dd
%dddn#1swxYwY||dd(d
d
||dd(d
%d
||dd(d||d
ddd||d
dd%d|t05|d)dddddn#1swxYwY||d
dd*d||d
dd*%d||d
d+d*d*||d
d+d*%d*||d
d+d,d,||d
d+d,%d,||d
d+d||ddd-d||ddd-%d||dd.d-d-||dd.d-%d-||dd.d/d/||dd.d/%d/||dd.d||ddd0d||ddd0%d||dd1d2d2||dd1d2%d2||dd1d0d0||dd1d0%d0||dd1d|jr||dd$dd||dd$d%d||dd4dd||dd4d%dd9||jd:<d;||jd<<||d||dd||d|||j||ddd=||ddd>||ddd?||dd:||dd:|||jd:||dd:|||jd:|t$j5}|d@ddddn#1swxYwY||jjdA||d7dd8|d=|d|v|t05|d=dddn#1swxYwY|t@5||j=dddn#1swxYwY|d
d=|d|d
v|t05|d
d=dddn#1swxYwY|d<|d
v|t05|d
d<=dddn#1swxYwY||jd<=|d<|d
v|t05||jd<=dddn#1swxYwY|t05|d@d=ddddS#1swxYwYdS)BN)

Commented BarFoo BarInternationalized Stuff	Long LineSection\with$weird%characters[	Spaces
Spacey BarSpacey Bar From The BeginningTypesThis One Has A ] In ItNoValue)bazqwe)foobar3rNcg|]}|Srrrsections  rrz,BasicTestCase.basic_test.<locals>.<listcomp>d'''W'''rrHrTbar1rMbar2rUrRrSrGbar4rLkey with spacesvalueanother with spacessplat!rOint*42float)\(?z0.44booleanF123strange but acceptablerPforksspoonsoption-without-valuefallbackvarszNo Such Foo Barzno-such-foozNo Such Spacey Barzno-such-int18gz
no-such-floatz0.0Tzno-such-booleanyesz
No Such Typeszno-such-option-without-valuezName is read-onlyzParser is read-onlyrJ7this line is much, much longer than my editor
likes it.1
this_value2
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 removedNo Such Section)rx)!r-appendsortsectionsassertEqualrr4r	listlennamer,getgetintassertAlmostEqualgetfloat
getbooleanassertRaisesr@NoSectionError
NoOptionErrorassertIsparserAttributeErrorKeyError
assertTrueremove_sectionassertFalse
has_option
remove_option	exceptionargs
ValueError)	r
r>EFLeqrrXcms	         r
basic_testzBasicTestCase.basic_testHs





	 
HHY	
_-
KKMM	


1aHH455	
1a
('B'''		%&&&	
1a./5577477OO
1aHHJJ477OOQQ(((	#	#MD'BtW\""""
2;;=="T12333	266)U##V,,,
266,&&///
26615996BBB
26615995AAA
266/5))6222
266/5))5111
266(-..888
266(122H===
299We$$b)))
266'5!!4(((r{{7G<<dCCC
266'7##V,,,
2==),,e444
266'5!!#;<<<
266*G44h???	@Brvvi!788$???	266)UU633V<<<
266)U%688%@@@


|:
;
;	-	-FF$e,,,	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-


|9
:
:	-	-FF9m,,,	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
266#UU6;;UCCC
266)]U6;;UCCC
266,655v>>>
266&6==tDDD
299Web9112666
299Wmb9992>>>
299Wmd9;;TBBB


|9
:
:	.	.IIg}---	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.r{{7G47 + 9 9:>	@	@	@r{{7O47 + 9 9:=	?	?	?
2;;w%;@@%HHH


|9
:
:	2	2KK111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2
2==)d=;;UCCC
2=="3e=DD			
2=="3d=CCTJJJ


|9
:
:	6	6MM'#4555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
2==)d=CCTJJJ	.Brvvi!7%vHH$OOOBrvvi!?$&&',
.
.
.	2i=(((
2lE"F+++45
7<8999

gnb)))


~
.
.	/	/.GL	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/


~
.
.	3	32GN	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3
75>6"""
75>5!!!
2ou%v...
2ou%u---
2h<)*G444
2h<-.999
2k?5!E	G	G	G	<Br)}34d;;;
2i=UE**F333
2i=UU33V<<<
2i=U%88%@@@


x
(
(	)	) !%((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)


x
(
(	)	)yM-((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)


x
(
(	=	= !%%ee%<<<	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=
2i=]E22E:::
2i=]U;;UCCC
2i=]++T222
2lt,,f555
2l55v>>>


x
(
(	6	6#$((555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
2g;eR(("---
2g;eb112666
2g;mR00"555
2g;mb992>>>
2g;mT22D999
2g;md;;TBBB
2g;m,,d333r'{33GSAA4HHHr'{33G=@ 4 B BCG	I	I	Ir'{33OSII3OOOr'{33O=@ 4 B BCF	H	H	H
2g;77???
2g;%@@%HHH
2g;00$777
2g;!!)T22E:::
2g;!!)d!;;UCCC
2g;!!"3U;;UCCC
2g;!!"3e!DD			
2g;!!"3T::DAAA
2g;!!"3d!CCTJJJ
2g;!!"344d;;;	.Br)}  !7??FFFBr)}  !7% HH$OOOBr)}  !?GGOOOBr)}  !?$!&&',
.
.
.254 .144 .	
))(33444x1BCCDDD**844555**4+?@@AAA((E::N	P	P	Py%88=	?	?	?)))U;;(	)	)	)	


i>>???)))\BBCCC(()=|LLMMMy,??@@@))$*>MMNNN


|:
;
;	7r.666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7*,@AAA
266+u%%E	G	G	G
wKB'''


x
(
(		7															


z
*
*	)	)4'(	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)|U#"\"22333


x
(
(	(	(< '	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(<(88999


x
(
(	/	/< .	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/t#$\2L)99:::


x
(
(	7	74'(6	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7


x
(
(	-	-$%e,	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-snRRR*S

SS%XXX,[[[^^	^8bbb1cc	c	h66h:=h:i66i:=i:kk	k	)oooHAH'H'AH+H.AH+J&AJ6J6AJ:J=AJ:K	AK0K0AK4K7AK4L;
AMMAMMAMN
AN)N)AN-N0AN-O9APPAPPAPP9
AQQAQQAQcd|j|j}|jr|dz
}||}|||jr|tj	5|
tjd|jdddn#1swxYwY|tj
5|
tjd|jddddS#1swxYwYdS|
tjd|j|
tjd|jdS)Nax[Foo Bar]
foo{0[0]}bar1
[Spacey Bar]
foo {0[0]} bar2
[Spacey Bar From The Beginning]
  foo {0[0]} bar3
  baz {0[0]} qwe
[Commented Bar]
foo{0[1]} bar4 {1[1]} comment
baz{0[0]}qwe {1[0]}another one
[Long Line]
foo{0[1]} this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]{0[1]} Bulgarian
foo{0[0]}Default
foo[en]{0[0]}English
foo[de]{0[0]}Deutsch
[Spaces]
key with spaces {0[1]} value
another with spaces {0[0]} splat!
[Types]
int {0[1]} 42
float {0[0]} 0.44
boolean {0[0]} NO
123 {0[1]} strange but acceptable
[This One Has A ] In It]
  forks {0[0]} spoons
z[NoValue]
option-without-value
z                    [Duplicate Options Here]
                    option {0[0]} with a value
                    option {0[1]} with another value
                z                    [And Now For Something]
                    completely different {0[0]} True
                    [And Now For Something]
                    the larch {0[1]} 1
                z                [Duplicate Options Here]
                option {0[0]} with a value
                option {0[1]} with another value
            z                [And Now For Something]
                completely different {0[0]} True
                [And Now For Something]
                the larch {0[1]} 1
            )formatr.r/r-r?rr3rr@DuplicateOptionErrorr<textwrapdedentDuplicateSectionErrorr

config_stringr>s   r
test_basiczBasicTestCase.test_basic(sL<F4?D122=	>	)
M__]
+
+;	*""<#DEE
.
.x0F4?++	 - -...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.""<#EFF
.
.x0
F4?++ - -...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
NN8?,t''	))
*
*
*
NN8?,
t''))
*
*
*
*
*s&=AC		C
C
3AEEEc
ddiddiddddddddiid	d
ddd
ddddddddddid
}|jr|dddii|}|||||jr|tj5|ddiddiddddn#1swxYwY|tj	5|dd d!d"iddddS#1swxYwYdS|ddiddid#|dd d!d"idS)$NrTrZr[rUrS)rTrRr\rs	BulgarianDefaultEnglishDeutsch)zfoo[bg]rTzfoo[en]zfoo[de]r^r`)r]r_rbreFrh)rardrf{rirj)
rHrMrNrGrJrKrIrLrOrPrQrkkeykey2value2)rtrzDuplicate Options Herezwith a valuezwith another value)optionOPTION)rXSECTION)
r-updater:	read_dictrr3rr@rr)r
configr>s   rtest_basic_from_dictz"BasicTestCase.test_basic_from_dictksvv..

2' $$	(($+'/
 -	'K(
(
R	MM*D



^^


V;	""<#EFF

))















""<#DEE

,"0"6//


















LL!7+"H-



LL(,2++




s$-CCCD((D,/D,c2|}|d|d|d|}||j}||gd|ddd||ddg||dddd|tj
5|ddddddn#1swxYwY||dd|
|dd|ddd	d
D],}||d|d-||ddg||ddg|dd||dg|d
|jd}||ddg||ddd|d|jdddi}||dddS)NAaB)rrrr^b@could not locate option, expecting case-insensitive option namesA-B	A-B valuea-bzA-bza-Br9has_option() returned false for option which should existr3[MySection]
Option{} first line   
	second line   
r	MySectionrOptionfirst line
second line[section]
nekey{}nevalue
rr,rXKey)r:add_sectionr{rzr|setoptionsrrr@rrrrrr?rr.)r
r>rropts     rtest_case_sensitivityz#BasicTestCase.test_case_sensitivitysF
^^


s
s
sKKMM	


1ooo
sC!!!
2::c??SE"""
266#sWM	O	O	O


|:
;
;	&	&FF3W%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	


c3//000sC00111
sE;'''/	M	MCOO

c3''K
M
M
M
M	2::c??UG$$$
2::c??SE"""
c"""
2::c??B__ELL"
$
$%%	2::k""XJ///
266+x((*CDDD__006tq7I0J0J',Wo77	


i7788888sD,,D03D0c	|}i|d<ddi|d<i|d<d|D}||j}|j}||t	dd|jdg||ddh||dddd|t5d|dd<dddn#1swxYwY|	d|dvd|dd	<d
D] }|	||dvd!||ddh||ddh|dd=||di|
d
|jd}||ddh||ddd|
d|jdddi}|	d|dvdS)Nrrr^rcg|]}|SrrrWs  rrzFBasicTestCase.test_case_sensitivity_mapping_access.<locals>.<listcomp>rYrrrrrrrrrrrrrrrrrrrX)
r:rzr|assertCountEqualr	r4rrrrr?rr.)r
r>rrelem_eqrs      r$test_case_sensitivity_mapping_accessz2BasicTestCase.test_case_sensitivity_mapping_accesss
^^

3.33''B'''	

'
1fc3 4c:;;<<<
2c7<<>>C5!!!
2c73<M	O	O	O


x
(
(	#	#"BsGCL	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	
r#w'''$3/	M	MCOOr#wK
M
M
M
M	2c7<<>>E7###
2c7<<>>C5!!!sGCL3###__ELL"
$
$%%	2k?!!H:...
2k?8$&?@@@__006tq7I0J0J',Wo77	
I./////sC&&C*-C*c"|ddi}|||jddd|ddi}|||jddddS)NrTBarFoorz<could not locate option, expecting case-insensitive defaults)r:r|rr4r
r>s  rtest_default_case_sensitivityz+BasicTestCase.test_default_case_sensitivity	s
^^UEN
+
+FF4'//N	P	P	P^^UEN
+
+FF4'//J	L	L	L	L	Lrcr|}||tjd|jd||tjd|jd||tjd}||jd|j	s||tjd}||jdtjdd	
}|jddkrtj}|f}ntj}|ddf}t|d
5}||||}dddn#1swxYwY||j|dSdS)Nz[Foo]
{}val-without-opt-name
rrNo Section!
)<???>rrz[Foo]
  wrong-indent
)rcfgparser.3
configdatasubdirr'z.  # INI with as many tricky parts as possible
utf-8encoding)
r:parse_errorr@ParsingErrorrr.MissingSectionHeaderErrorr|rr-rfindfileopen)r
r>etrickyerrorexpectedfs       rtest_parse_errorszBasicTestCase.test_parse_errorss
^^

\644:F4?1;M4N4N	P	P	P	
\644:F4?1;M4N4N	P	P	P
R!G,
.
.!>???"	/  \%> 9;;AQVZ000%mLIIIFq!S(($1"9$>"AMOfw///
31$$R22
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3QVX.....	/	/s+FFFct|dr|}ntj|}||5}||dddn#1swxYwY|jS)Nreadline)hasattrioStringIOr	read_filer)r
r>excsrcsiors      rrzBasicTestCase.parse_error/s3
##	#CC+c""C


s
#
#	rLL															|sAA#&A#c$|}||gd||dd|tj5|ddddn#1swxYwY|tj5|	ddddddn#1swxYwY|
|tjdd}||jd|d|
|tj
dd}||jddS)	Nz0new ConfigParser should have no defined sectionsrz5new ConfigParser should have no acknowledged sectionsrTbarr^)rT)rrT)r:r|r{rhas_sectionrr@rrr	get_errorrrrr
r>rs   rtest_query_errorszBasicTestCase.test_query_errors8s
^^

K	M	M	M..$	%	%	%

|:
;
;		JJu															


|:
;
;	*	*FF5%)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*NN2|:E5II***
uNN2|95%HH00000s$B((B,/B,C66C:=C:c	||||d|jd|jdS#|$r}|cYd}~Sd}~wwxYw)Nzexpected exception type .)rfailr"r#)r
r>rrXrrs      rrzBasicTestCase.get_errorIs	<FF7F###
III)9)9;
<
<
<
<
<			HHHHHH	s?AAAAc|d|jd}tddD]}||dd|z||dd|z|t|jdd	|zdS)
Nz[BOOLTEST]
T1{equals}1
T2{equals}TRUE
T3{equals}True
T4{equals}oN
T5{equals}yes
F1{equals}0
F2{equals}FALSE
F3{equals}False
F4{equals}oFF
F5{equals}nO
E1{equals}2
E2{equals}foo
E3{equals}-1
E4{equals}0.1
E5{equals}FALSE AND MORErequalsrBOOLTESTzt%dzf%dze%d)	r?rr.rangerrrrr)r
r>xs   rtest_booleanzBasicTestCase.test_booleanRs
__
'(.vT_Q5Gv'H'H!$q!	D	DAOOBMM*eai@@AAAR]]:uqyAABBBj mZ
D
D
D
D	D	Drc	B|}|d|tj5}|ddddn#1swxYwY|j}|t|d||jd|j	r\|tj5}|
tjd
|jdddddn#1swxYwY|j}|t|d	||jd
|tj5}|ddd
didddn#1swxYwY|j}|t|d||jddSdS)NrzSection 'Foo' already exists)rNNz                    [Foo]
                    will this be added{equals}True
                    [Bar]
                    what about this{equals}True
                    [Foo]
                    oops{equals}this won't
                rr	<foo-bar>sourcezFWhile reading from '<foo-bar>' [line  5]: section 'Foo' already exists)rrrrvalzis really `opt`)rOPTzIWhile reading from '<dict>': option 'opt' in section 'Bar' already exists)rrz<dict>N)r:rrr@rrr|strrr3r<rrrr.rr)r
r>rrs    rtest_weird_errorszBasicTestCase.test_weird_errorsks
^^


u


|A
B
B	"bNN5!!!	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"LQ!?@@@!4555;	E""<#EFF
L"x0F$/!"4F55 7 7@KLLL
L
L
L
L
L
L
L
L
L
L
L
L
L
L
LASVV&O
P
P
PQV%<===""<#DEE
PeU;L%M%MNOOO
P
P
P
P
P
P
P
P
P
P
P
P
P
P
PASVV&M
N
N
NQV%CDDDDD)	E	Es7	A++A/2A/"A	D77D;>D;&G

GGcd|j|jd|j}|jr|dz
}||}dD]}t
j}||||jd}|rd|}d||j	}|jr|d
z
}|	|
|dS)Na8[Long Line]
foo{0[0]} this line is much, much longer than my editor
   likes it.
[{default_section}]
foo{0[1]} another very
 long line
[Long Line - With Comments!]
test {0[1]} we        {comment} can
            also      {comment} place
            comments  {comment} in
            multiline {comment} values
r)commentr4z![Valueless]
option-without-value
)TF)space_around_delimitersz {} z[{default_section}]
foo{equals}another very
	long line

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

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

)rr4z"[Valueless]
option-without-value

)rr.r/r4r-r?rrwriter|getvalue)r
rr>r
output	delimiter
expect_strings       r
test_writezBasicTestCase.test_writes1
1Fq1I(,(<>>		
%
M
__]
+
+'4	?	?#[]]FHHV5LHMMM*I&
5"MM)44	
V9,0,@BB
""


V__..
>>>>;	?	?rc|d|jd}Gddt}|ddd|dd|d|dd	d|dd	|d|ddd|dd	ddS)
N[sect]
option1{eq}foo
rrceZdZdS)2BasicTestCase.test_set_string_types.<locals>.mystrN)r!r"r#rrrmystrrsDrrsectoption1splatoption2)r?rr.r	r)r
r>rs   rtest_set_string_typesz#BasicTestCase.test_set_string_typess
__006$/!:L0M0MOO					C			
vy'***
vy%%..111
vy'***
vy%%..111
vy'***
vy'*****rc6|jddkr|dtjdd}|}||dgd	}|||g||d
dd|}||d	}|||g||d
dd|}|tj	|d	}|||g||d
dd|}|tj	||gd	}||||g||d
dd|}|dgd	}||g|}|gd	}||gdS)
Nrr'incompatible formatcfgparser.1rrnonexistent-filerrrHrTnewbar)
r.skipTestrrr:readr|rpathlibPath)r
file1r>parsed_filess    rtest_read_returns_file_listz)BasicTestCase.test_read_returns_file_lists[?1$$MM/000 |DDD
^^

ww'9:WwMMw///	5118<<<
^^

wwuww77w///	5118<<<
^^

www|E22WwEEw///	5118<<<
^^

wwU 3 3U;gwNNu~666	5118<<<
^^

ww 23gwFFr***
^^

wwrGw44r*****rc0|jddkr|dtjdd}|}||d}|||g|}|d	d}||g|}||d	gd}|||gdS)
Nrr'r r!rrrrsnonexistent-file)r.r$rrencoder:r%r|)r
file1_bytestringr>r)s    r0test_read_returns_file_list_with_bytestring_pathz>BasicTestCase.test_read_returns_file_list_with_bytestring_paths?1$$MM/000"+M,OOOVVXX
^^

ww/'wBB(8'9:::
^^

ww2WwEEr***
^^

ww 02EFQXwYY(8'9:::::rcj|d|jdS)Nah[Foo]
bar{equals}something %(with1)s interpolation (1 step)
bar9{equals}something %(with9)s lots of interpolation (9 steps)
bar10{equals}something %(with10)s lots of interpolation (10 steps)
bar11{equals}something %(with11)s lots of interpolation (11 steps)
with11{equals}%(with10)s
with10{equals}%(with9)s
with9{equals}%(with8)s
with8{equals}%(With7)s
with7{equals}%(WITH6)s
with6{equals}%(with5)s
With5{equals}%(with4)s
WITH4{equals}%(with3)s
with3{equals}%(with2)s
with2{equals}%(with1)s
with1{equals}with

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

[Interpolation Error]
name{equals}%(reference)s
rr)r?rr.rs rget_interpolation_configz&BasicTestCase.get_interpolation_configs8
*.+1&8J&*K*K1MM	Mrc|d|jddi}t|dddi}|||||tj	5|dddddS#1swxYwYdS)	Nz
            [section]
            name {0[0]} %(value)s
            key{0[1]} |%(name)s|
            getdefault{0[1]} |%(default)s|
        default	<default>rrXr^rnzno such section)
r?rr.r}rrzr|rr@r)r
rr>rs    rcheck_items_configz BasicTestCase.check_items_configs
__

F4?##y+.FHH
)7G*<==>>	H%%%


|:
;
;	(	(HH&'''	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(s!CCCc
|d|jddi}||dd||dd||dd|t5|ddddS#1swxYwYdS)	N
            [section1]
            name1 {0[0]} value1
            [section2]
            name2 {0[0]} value2
            [section3]
            name3 {0[0]} value3
        r2r3rrsection1section2section3)r?rr.r|popitemrrrs  rtest_popitemzBasicTestCase.test_popitem)s&
__
F4?##y+.FHH	
a*555a*555a*555


x
(
(		JJLLL																		sC88C<?C<c|ddi}|||jdddddd|d<||dg|t|dhd	||t|t|t||jdhdS)
NrTrrrvalue1r)rrzing>rTrr)r:r|rr4r{rrclearrs  r
test_clearzBasicTestCase.test_clear8s"
^^UEN
+
+FF4'//N	P	P	P"*h??6
111RZ__..//1N1N1NOOO



R[[]]++SUU333R 45::<<==wGGGGGrc*	|d|jddi}|t	|dddh|t	|dd	dh|t	|d
ddh||ddd||dd	d
||d
dd||gdddi|d<|t	|dddh||ddd|d	|d||gdi|d
<|t	|d
dh|d|d
||gd||j||j<|	t	||jt	i||j<|t	||jt	|t	|ddh|t	|ddh|t	|d
t	||gd|d|d<|t	|ddhdS)Nr6nameDvalueDrr7name1namedr8name2r9name3r=rvalue3)r7r8r9name22value22)
r?rr.r|rrr{assertNotInr4assertNotEqualrs  rtest_setitemzBasicTestCase.test_setitemDs
__
F4?##w.ACC	
R
^002233gw5GHHHR
^002233gw5GHHHR
^002233gw5GHHHJ0(;;;J0(;;;J0(;;;(L(L(LMMM"I.:R
^002233h5HIIIJ19==="Z.111(L(L(LMMM:R
^002233gY???"Z.111(L(L(LMMM#%d&:#;4 C4#7 8 = = ? ?@@#%%HHH#%4 R 45::<<==suuEEER
^002233gY???R
^002233hZ@@@R
^002233SUU;;;(L(L(LMMMJ:R
^002233hZ@@@@@rc|jr|dtjd|jd}|}|tj	5|
|dddn#1swxYwY||ddd||ddddS)Nz2if no_value is allowed, ParsingError is not raisedzC            [DEFAULT]
            test {0} test
            invalidrDEFAULTtest)
r-r$rrrr.r:rr@rr<r|r)r
invalidr>s   rtest_invalid_multiline_valuez*BasicTestCase.test_invalid_multiline_valuejs%	PMMNOOO/#vdoa011


^^




|8
9
9	$	$NN7###	$	$	$	$	$	$	$	$	$	$	$	$	$	$	$	622F;;;Iv.77777sB$$B(+B(N)r!r"r#rrrrrrrrrrrr
rrr*r.r0r4r;r@rMrRrrrrErEFs[-[-[-@A*A*A*FJJJX'9'9'9T&0&0&0PLLL///8111"<<<DDD2EEE>4?4?4?l++++++B;;;$MMM6(((



H
H
H$A$A$AL
8
8
8
8
8rrEc eZdZejZdZdS)StrictTestCaseTN)r!r"r#r@RawConfigParserr7r3rrrrTrTzs/L
FFFrrTcLeZdZejZdZdZdZdZ	dZ
dZdZdZ
d	S)
ConfigParserTestCasec|}|j}||ddd||ddd||ddd||tjdd}|jtjkr||jd	dSt|jtj
r||jd	dSdS)
Nrrz%something with interpolation (1 step)bar9z.something with lots of interpolation (9 steps)bar10z/something with lots of interpolation (10 steps)bar11)r[r5something %(with11)s lots of interpolation (11 steps))r0r|rrr@InterpolationDepthErrorr5rCr
isinstanceLegacyInterpolation)r
r>rrs    rtest_interpolationz'ConfigParserTestCase.test_interpolations<

*
*
,
,


266%!HIII
266%  ;	=	=	=
266%!!<	>	>	>NN2|CUGTT!444QV&I
J
J
J
J
J
*L,L
M
M	JQV&I
J
J
J
J
J	J	Jrc|}||tjdd}||jd||jd||jd|jtj	kr||j
ddSt|jtjr||j
ddSdS)NInterpolation Errorr	reference)rrbz
%(reference)src)
r0rr@InterpolationMissingOptionErrorr|rcrXrr5rCrr^r_rs   r test_interpolation_missing_valuez5ConfigParserTestCase.test_interpolation_missing_values

*
*
,
,NN2|K0&
:
:k222$9:::6***!444QV&B
C
C
C
C
C
*L,L
M
M	CQV&B
C
C
C
C
C	C	Crc4|gddS)N)r2r3)
getdefaultz|<default>|)rz|value|)rr^r4rs r
test_itemszConfigParserTestCase.test_itemss3!4!4!4	5	5	5	5	5rc|d|jd}||ddd|jtjkr,||ddddSt|jtj	rK|
t5|ddddddS#1swxYwYdSdS)	Nzc[section]
option1{eq}xxx
option2{eq}%(option1)s/xxx
ok{eq}%(option1)s/%%s
not_ok{eq}%(option2)s/%%srrrXokzxxx/%snot_okz
xxx/xxx/%s)r?rr.r|rr5r@rCr^r_r	TypeErrorrs  rtest_safe_interpolationz,ConfigParserTestCase.test_safe_interpolationsK
__9:@$(OA$6:@:8:8	99	
	400(;;;!444RVVIx88,GGGGG
*L,L
M
M	,""9--
,
,y(+++
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,	,	,sC==DDcj|d|jd}||ddd|t|jddd|t|jddd|t|jddd	||ddd|dd
d||dd
ddS)
NrrrrrrT%foofoo%f%oorfoo%%barzfoo%bar)r?rr.r|rrrrrs  r#test_set_malformatted_interpolationz8ConfigParserTestCase.test_set_malformatted_interpolations
__006$/!:L0M0MOO	
	22E:::*bffiHHH*bffiHHH*bffiHHH	22E:::	vy*---	22I>>>>>rc|d|jd}|t|jddd|t|jddd|t|jddt
|t|jddd|t|jddd|t|jddt
|t|jdd	d
|t|jd	dS)Nrrrrrrg?rrzinvalid opt name!)r?rr.rrnrobjectrrs  rtest_set_nonstring_typesz-ConfigParserTestCase.test_set_nonstring_typess/
__006$/!:L0M0MOO	
)RVVYBBB)RVVYDDD)RVVYIII)RVVYBBB)RVVYDDD)RVVYIII)RVVS:MNNN)R^S99999rcz|}|t|j|jdSr)r:rrrr4rs  rtest_add_section_defaultz-ConfigParserTestCase.test_add_section_defaults4
^^

*bnd6JKKKKKrc|ddi}|||jdd|||jdd|ddi}|||jdd	|||jddd
S)zbpo-23835 fix for ConfigParserr333333@rrtz2.4r@rz5.2N)r:r|r4rrrs  rtest_defaults_keywordz*ConfigParserTestCase.test_defaults_keywords
^^aX^
.
.D01#6>>>r$"67@@EEsKKK
^^c3Z^
0
0D01#6>>>r$"67@@EEsKKKKKrN)r!r"r#r@ConfigParserr7r`rerjrorurxrzr~rrrrWrWs,LJJJ CCC555
,
,
,??? :::LLLLLLLLrrWc|eZdZejZdZejd	Z
dZdZdZ
dZdS)#ConfigParserTestCaseNoInterpolationNz
        [numbers]
        one = 1
        two = %(one)s * 2
        three = ${common:one} * 3

        [hexen]
        sixteen = ${numbers:two} * 8
    c||ddd||ddd||ddd||dd	d
dS)Nnumbersonerttwoz%(one)s * 2threez${common:one} * 3hexensixteenz${numbers:two} * 8)r|rs  rassertMatchesIniz4ConfigParserTestCaseNoInterpolation.assertMatchesInisIu-s333Iu-}===Iw/1DEEEGY/1EFFFFFrcd||j}||dSr)r?inirrs  rtest_no_interpolationz9ConfigParserTestCaseNoInterpolation.test_no_interpolations/
__TX
&
&b!!!!!rc~|}||ddSN)r:assertIsNoner<rs  rtest_empty_casez3ConfigParserTestCaseNoInterpolation.test_empty_cases7
^^

"..,,-----rcGddtj}|}||j||dS)NceZdZdZdS)bConfigParserTestCaseNoInterpolation.test_none_as_default_interpolation.<locals>.CustomConfigParserN)r!r"r#_DEFAULT_INTERPOLATIONrrrCustomConfigParserrs%)"""rr)r@rr<rr)r
rr>s   r"test_none_as_default_interpolationzFConfigParserTestCaseNoInterpolation.test_none_as_default_interpolationsm	*	*	*	*	*!:	*	*	* 

!
!
tx   b!!!!!r)r!r"r#r@rr7r5rrstriprrrrrrrrrrs,LM
(/		
GGG"""..."""""rrceZdZejZej5ejde	ej
Zdddn#1swxYwYdZdS)'ConfigParserTestCaseLegacyInterpolationignoreNc|d|jd}||ddd|ddd||ddd|ddd||ddd|ddd	||ddd	|dd
d||dd
ddS)NrrrrrrTrqrrrsrrt)r?rr.r|rrrs  rruzKConfigParserTestCaseLegacyInterpolation.test_set_malformatted_interpolationsH
__006$/!:L0M0MOO	
	22E:::
vy&)))	22F;;;
vy&)))	22F;;;
vy&)))	22F;;;	vy*---	22J?????r)
r!r"r#r@rr7warningscatch_warningssimplefilterDeprecationWarningr_r5rurrrrrs,L	 	 	"	";;h(:;;;88::
;;;;;;;;;;;;;;;@@@@@s!AAArceZdZdZdS),ConfigParserTestCaseInvalidInterpolationTypectjddfD]w}||5|t5tj|dddn#1swxYwYdddn#1swxYwYxdS)Nrbza string)r^r5)r@ExtendedInterpolationsubTestrrnr)r
r^s  r*test_error_on_wrong_type_for_interpolationzWConfigParserTestCaseInvalidInterpolationType.test_error_on_wrong_type_for_interpolations2"82
K	C	CEE**
C
C&&y11CC -EBBBBCCCCCCCCCCCCCCC
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C	C	Cs5A<A%A<%A))A<,A)-A<<B	B	N)r!r"r#rrrrrrs(CCCCCrrceZdZdZdZdZdS))ConfigParserTestCaseNonStandardDelimitersz:=$//"Nr!r"r#r.r/r0rrrrr%!J")rrceZdZdZdS)-ConfigParserTestCaseNonStandardDefaultSectiongeneralN)r!r"r#r4rrrrr+sOOOrrcZeZdZejZdddZdZdZ	dZ
dS)MultilineValuesTestCasezSI'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam! 	
c|}tdD]m}d|}||tdD]1}||d||j2nt
tjdd5}|	|ddddS#1swxYwYdS)Ndz	section{}
z
lovely_spam{}wrr)
r:rrrrwonderful_spamrrTESTFNr)r
r>rsjrs      rsetUpzMultilineValuesTestCase.setUp5s
^^

s	J	JA""1%%ANN12YY
J
Jq/0033T5HIIII
J
)"C'
:
:
:	aHHQKKK																		s.CCCcBtjtjdSr)osunlinkrrrs rtearDownz MultilineValuesTestCase.tearDown?s
	)"#####rcD|}ttjd5}||dddn#1swxYwY||dd|jdddS)Nrrsection8lovely_spam4r
)	r:rrrrr|rrreplace)r
cf_from_filers   r test_dominating_multiline_valuesz8MultilineValuesTestCase.test_dominating_multiline_valuesBs~~''
)"W
5
5
5	&""1%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&))*nEE,44VTBB	D	D	D	D	DsAAAN)r!r"r#r@rr7rrrrrrrrrr/sg,L,-4WS&-A-A$$$DDDDDrrc4eZdZejZdZdZdZdZ	dS)RawConfigParserTestCasec<|}|j}||ddd||ddd||ddd||ddd	dS)
Nrrz*something %(with1)s interpolation (1 step)rYz3something %(with9)s lots of interpolation (9 steps)rZz5something %(with10)s lots of interpolation (10 steps)r[r\)r0r|rr
r>rs   rr`z*RawConfigParserTestCase.test_interpolationOs

*
*
,
,


266%7	9	9	9
266%  @	B	B	B
266%!!B	D	D	D
266%!!B	D	D	D	D	Drc4|gddS)N)rg)rhz
|%(default)s|)rz
|%(name)s|)rz	%(value)srirs rrjz"RawConfigParserTestCase.test_items[s3!8!8!8	9	9	9	9	9rcV|}|d|ddd|ddgd|ddddi||ddd||ddgd||ddddi|d	|d	d
d||d	d
d|jtjurKd|_|ddd||ddddSdS)
Nz
non-stringrarr})rrrr
r6pign!	@rzthis is sickTc|Srr)rs r<lambda>zBRawConfigParserTestCase.test_set_nonstring_types.<locals>.<lambda>qsqr)	r:rrr|r_dictr@rAoptionxformrs  rrxz0RawConfigParserTestCase.test_set_nonstring_typesas
^^


|$$$
|UA&&&
|V%>%>%>???
|VdG_555e44a888f55222	4	4	4f55gGGG
s
sND)))^44d;;;
8|111)[BNFF<A&&&RVVL!44a8888821rcl|t5}|ddidddn#1swxYwY|j}|t|d|ddi}|||jdddS)	z-bpo-23835 legacy behavior for RawConfigParserrr|rNz%'int' object has no attribute 'lower'rr}r)rrr:rr|r	rr4)r
ctxerrr>s    rr~z-RawConfigParserTestCase.test_defaults_keywordus


~
.
.	.#NNQHN---	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.mS#JKKK
^^c3Z^
0
0r$"67<cBBBBBsAAAN)
r!r"r#r@rUr7r`rjrxr~rrrrrLs`/L
D
D
D999999(CCCCCrrceZdZdZdZdZdS),RawConfigParserTestCaseNonStandardDelimitersrrNrrrrrrrrrc.eZdZejZdZdZdZdZ	dS)RawConfigParserTestSambaConf)r*r)z----)rFcbtjdd}|}||dgd}|||ggd}|||||dd	d
||ddd||dd
d||ddddS)Nzcfgparser.2rrr"rr)globalhomesprinterszprint$z
pdf-generatortmpAgustinr	workgroupMDKGROUPzmax log size2zhosts allowz127.rzecho commandz
cat %s; rm %s)rrr:r%r|r{rr)r
smbconfr>r)r{s     rtest_readingz)RawConfigParserTestSambaConf.test_readings!"=FFF
^^

ww);<wwOOy111AAA111+66
CCC8^<<bAAA-88&AAA~66HHHHHrN)
r!r"r#r@rUr7r/r0r1rrrrrrsB/L)%!IIIIIrrcneZdZejZejZdZdZ	ddZ
dZdZdZ
dZd	Zd
ZdS))ConfigParserTestCaseExtendedInterpolationcommonTNcl||}|r||_|||Sr)r:rr<)r
r=r,rr>s     rr?z4ConfigParserTestCaseExtendedInterpolation.fromstrings9
^^H
%
%	)(BN
v	rc|tjd}|j}||ddd||ddd||ddd||ddd||ddd	||dd
d||ddd
||ddd||ddd||ddd||ddd||ddd||ddd||ddd||ddd||dd
d||ddddS)Na
            [common]
            favourite Beatle = Paul
            favourite color = green

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

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

            [stanley]
            favourite Beatle = ${ambv:favourite Beatle}
            favourite pope = ${tom:favourite pope}
            favourite color = black
            favourite state of mind = paranoid
            favourite movie = soylent ${common:favourite color}
            favourite song = ${favourite color} sabbath - ${favourite state of mind}
        rzfavourite BeatlePaulzfavourite colorgreentomzfavourite bandz	green dayzfavourite popezJohn Paul IIsequelz
John Paul IIIambvGeorgezson of Edward VIIzGeorge Vzson of George Vz	George VIstanleyblackzfavourite state of mindparanoidzfavourite moviez
soylent greenzfavourite songzblack sabbath - paranoid)r?rrrr|rs   rtest_extended_interpolationzEConfigParserTestCaseExtendedInterpolation.test_extended_interpolations)
__X_.

,UWW-0

2h<*+V444
2h<)*G444
2e9'(&111
2e9&'111
2e9%&444
2e9%&777
2e9X000
2f:()8444
2f:'('222
2f:)*J777
2f:'(+666
2i=+,h777
2i=*+W555
2i=23Z@@@
2i=*+_===
2i=)*N;;;
2i=)*%	'	'	'	'	'rc|tjd}|t
j5|dddddn#1swxYwY|t
j5|ddddddS#1swxYwYdS)Nz
            [one for you]
            ping = ${one for me:pong}

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

            [selfish]
            me = ${me}
        zone for youpingselfishme)r?rrrrr@r]rs  rtest_endless_loopz;ConfigParserTestCaseExtendedInterpolation.test_endless_loops;
__X_	.	
	
UWW		

|C
D
D	&	&}f%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&


|C
D
D	 	 yM$	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 s$A44A8;A8B::B>B>c|d}||ddd||ddd||dddtj}||5}|dd	dddn#1swxYwY||jjd
||jjdddS)
Nz
            [dollars]
            $var = $$value
            $var2 = ${$var}
            ${sick} = cannot interpolate me

            [interpolated]
            $other = ${dollars:$var}
            $trying = ${dollars:${sick}}
        dollarsz$varz$valueinterpolatedz$otherz${sick}zcannot interpolate mez$tryingzdollars:${sickrz${dollars:${sick}})r?r|r@rdrrrcr)r
r>exception_classrs    rtest_strange_optionsz>ConfigParserTestCaseExtendedInterpolation.test_strange_optionss<
__		
	
	
Iv.999N+H5x@@@Iy13JKKK&F



/
/	*2~y))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/1ABBB*1-/CDDDDDsB88B<?B<ctjd}||}|j}||ddd||ddd||ddd||ddd	||d
dd||d
d
ddS)Naj
            [common]
            optionlower = value
            OptionUpper = Value

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

            [random]
            foolower = ${common:optionlower} redefined
            FooUpper = ${Common:OptionUpper} Redefined
        roptionlowerr^OptionUpperValueCommona better valueA Better Valuerandomfoolowervalue redefinedFooUpperA Better Value Redefined)rrrr?r|r
rr>rs    rtest_case_sensitivity_basiczEConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_basicso

UWW	__S
!
!


2h<
&000
2h<
&000
2h<
&(8999
2h<
&(8999
2h<
#%6777
2h<
#%?@@@@@rcHtjd}|tj5||}dddn#1swxYwY||d}|j}||ddd||ddd||d	dd
||d	dd||dd
d||ddddS)Na8
            [common]
            option = value
            Option = Value

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

            [random]
            foo = ${common:option} redefined
            Foo = ${Common:Option} Redefined
        c|Srr)rs rrz[ConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflicts.<locals>.<lambda>#s#r)rrrr^rr	r
rrr
rTrrr)rrrrr@rr?r|rs    rtest_case_sensitivity_conflictszIConfigParserTestCaseExtendedInterpolation.test_case_sensitivity_conflictssro

UWW	

|@
A
A	&	&%%B	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&__Soo_
>
>


2h<!7+++
2h<!7+++
2h<!#3444
2h<!#3444
2h< 1222
2h< :;;;;;sA((A,/A,c^|d}|tj5|dddddn#1swxYwY|tj5|dddddn#1swxYwY|tj5|dddddn#1swxYwY|tj5|dddddn#1swxYwY|tj5|dddddn#1swxYwY|t
5d|dd	<ddddS#1swxYwYdS)
Na
            [interpolation fail]
            case1 = ${where's the brace
            case2 = ${does_not_exist}
            case3 = ${wrong_section:wrong_value}
            case4 = ${i:like:colon:characters}
            case5 = $100 for Fail No 5!
        zinterpolation failcase1case2case3case4case5z
BLACK $ABBATHcase6)r?rr@InterpolationSyntaxErrorrdrrs  rtest_other_errorsz;ConfigParserTestCaseExtendedInterpolation.test_other_errors,s)
__



|D
E
E	.	.#$W--	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.


|K
L
L	.	.#$W--	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.


|K
L
L	.	.#$W--	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.


|D
E
E	.	.#$W--	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.


|D
E
E	.	.#$W--	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.


z
*
*	@	@0?B#$W-	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@skAAA:BBB?CC!CDD#&D#	E$$E(+E(	F""F&)F&)NN)r!r"r#r@rr7rr5r4r3r?rrrrrrrrrrrs,L6L688MO
F+'+'+'Z   "EEE*AAA0<<<6@@@@@rrceZdZdZdS)ConfigParserTestCaseNoValueTN)r!r"r#r-rrrr!r!DsNNNrr!c8eZdZejZdhZdhZdZdZ	dZ
dS)ConfigParserTestCaseTrickyFiler'r*Tc"tjdd}|}|t	||dd||gd|||jdd	d
id|	t5||jdd
d	d
idddn#1swxYwY|t	|dddd|t	|ddddd}|
||d|||dd|t	|dd|	t j5|ddddn#1swxYwY||ddd||dd|dd||d dd!dS)"Nrrrrrr)strange
corruption&yeah, sections can be indented as wellanother one!no values heretricky interpolationmore interpolationgointerpolatez-1rnT)rawror%otherrr&r^rr'zare they subsectionszlets use some Unicodeu	片仮名r(rr)r*letszdo thisr+zgo shopping)rrr:r|r~r%r{rr4rrrsplitrrrr@rd)r
rr>longnames    rtest_cfgparser_dot_3z3ConfigParserTestCaseTrickyFile.test_cfgparser_dot_3NsX!-EEE
^^

RWWVgW>>??CCC)?)?)?	@	@	@	
4#7)6(=#??@B	D	D	D


z
*
*	2	2IId*Dd)40

2
2
2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	
RVVIw77==dCCDDaHHHRVVL'::@@FFGGLLL;x1GHHIII*ABBKPPPRXXn5566:::


|K
L
L	'	'HH%&&&	'	'	'	'	'	'	'	'	'	'	'	'	'	'	' 6??KKK 6?? 6==	?	?	? 4f==}MMMMMs$!DDDI22I69I6ctjdd}|}|t5||dddddS#1swxYwYdS)Nrrrasciir)rrr:rUnicodeDecodeErrorr%)r
rr>s   rtest_unicode_failurez3ConfigParserTestCaseTrickyFile.test_unicode_failurens!-EEE
^^




1
2
2	.	.GGFWG---	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.A**A.1A.N)r!r"r#r@rr7r.r/r-r5r9rrrr#r#HsR,LJuNNNN@.....rr#c(eZdZdZdZdZdZdZdS)Issue7005TestCasezrTest output when None is set() as a value and allow_no_value == False.

    http://bugs.python.org/issue7005

    z[section]
option = None

c|d}|d|dddtj}|||SNF)r-rXr)rrrrrr)r
r7cprs    rpreparezIssue7005TestCase.prepare~sd
\
/
/
/
y!!!
y(D)))kmm



||~~rctjd}|d|t5|dddddddS#1swxYwYdSr>)r@rrrrnr)r
r?s  rtest_none_as_value_stringifiedz0Issue7005TestCase.test_none_as_value_stringifieds

&e
<
<
<
y!!!


y
)
)	.	.FF9h---	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.r:cz|tj}|||jdSr)r@r@rUr|expected_output)r
rs  r"test_none_as_value_stringified_rawz4Issue7005TestCase.test_none_as_value_stringified_raws5l:;;!566666rN)r!r"r#__doc__rDr@rBrErrrr<r<usR5O...77777rr<ceZdZeZdZdS)SortedTestCasec|d}tj}||||ddS)Nz [b]
o4=1
o3=2
o2=3
o1=4
[a]
k=v
z,[a]
k = v

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

)r?rrrr|r)r
r>rs   rtest_sortedzSortedTestCase.test_sortedsl
__%&&
**&	'	'	'	'	'rN)r!r"r#rr2rJrrrrHrHs(I'''''rrHc*eZdZejZdZdZdZdS)CompatibleTestCasez#;r)cTtjd}||}||ddd||ddd||ddddS)	Nz        [Commented Bar]
        baz=qwe ; a comment
        foo: bar # not a comment!
        # but this is a comment
        ; another comment
        quirk: this;is not a comment
        ; a space must precede an inline comment
        rGrTzbar # not a comment!rRrSquirkzthis;is not a comment)rrr?r|rrs   rtest_comment_handlingz(CompatibleTestCase.test_comment_handlings )


__]
+
+77/	1	1	177???990	2	2	2	2	2rN)	r!r"r#r@rUr7r/r0rOrrrrLrLs7/L!22222rrLc$eZdZejZddZdS)CopyTestCaseNcd||}|||}|||D]G}|j|jkr||jD]\}}|||kr||=H|Sr)r:r<rrrr4r)r
r=r,r>cf_copyrXr2r^s        rr?zCopyTestCase.fromstrings
^^H
%
%
v.."""~~''	)	)G|t333"$T%9":"@"@"B"B
)
)7#u,,(
)rr)r!r"r#r@rr7r?rrrrQrQs0,L





rrQceZdZdZdZdS)FakeFilectjdd}t|d5}||_|jddddS#1swxYwYdS)Nr!rrrr)rrr	readlineslinesreverse)r
	file_pathrs   r__init__zFakeFile.__init__s$]<HHH	
)g
.
.
.	!!DJJ   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!s3A((A,/A,c`t|jr|jSdSr)r~rXpoprs rrzFakeFile.readlines)tz??	$:>>###rrN)r!r"r#r[rrrrrUrUs2!!!rrUc#nK|}|r|V|}|dSdS)z+As advised in Doc/library/configparser.rst.N)r)rlines  rreadline_generatorr`sO::<<D



zz||rc&eZdZdZdZdZdZdS)ReadFileTestCasectjddg}	||ddn#t$rYnwxYw|D]}tj}t|d5}||dddn#1swxYwY|	d||	d	|d|
|dd	d
dS)Nr!rrrutf8rrrHrTr#)rrryr,UnicodeEncodeErrorr@rrrassertInr|)r

file_pathsrZrrs     r	test_filezReadFileTestCase.test_files\&}\JJJK
	jm226::;;;;!			D	#	A	AI!.00Fi'222
$a  ###
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$MM)V,,,MM%	!2333VI.u5x@@@@
	A	As#.A
AAB""B&	)B&	cptjdd}t	j}|||d||d|d||ddddS)Nz%
        [Foo Bar]
        foo=newbarrrHrTr#)	rrrr3r@rrrfr|)r
rXrs   r
test_iterablezReadFileTestCase.test_iterables!uwwuuT{{	*,,

i(((

eVI.///	*518<<<<<rctj}|t5|tdddn#1swxYwY|t
t|d||d|d||ddddS)z
Issue #11670.NrHrTr#)	r@rrrnrrUr`rfr|r
rs  rtest_readline_generatorz(ReadFileTestCase.test_readline_generators*,,


y
)
)	)	)XZZ(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)+HJJ77888

i(((

eVI.///	*518<<<<<s"AA #A ctjdd}t	j}|tj5}||ddddn#1swxYwY|	t|jdtjdd}t	j}|tj5}||ddddn#1swxYwY|	t|jdtjd	d}t	j}|tj
5}||ddddn#1swxYwY|	t|jd
tjdd}t	j}|tj5}||ddddn#1swxYwY|	t|jddS)
z
Issue #18260.z"
        [badbad]
        [badbad]rsbadbadrNzGWhile 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')rrrr3r@rrrrr|r	rrrr)r
rXrdses    rtest_source_as_bytesz%ReadFileTestCase.test_source_as_bytes
s!UWWUU4[[	*,,


|A
B
B	6cU9555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6

	
	
	

!eggeeDkk	*,,


|@
A
A	6SU9555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6

&	
	
	

!%''%%++	*,,


|8
9
9	6SU9555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
M	
	
	
!eggeeDkk	*,,


|E
F
F	6#U9555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6

	
	
	
	
	
sH,BBB.EEE0HHH2KKKN)r!r"r#rhrjrmrprrrrbrbsSAAA======-
-
-
-
-
rrbcHeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdS)CoverageOneHundredTestCasez"Covers edge cases in the codebase.ctjdd}||jd||jd||jd||jd||jd|t|ddS)NrXr)rXrNNz3Option 'option' in section 'section' already exists)	r@rr|rXrrlinenorr	r
rs  rtest_duplicate_option_errorz6CoverageOneHundredTestCase.test_duplicate_option_error=s1)XFF	222x000t,,,t,,,%FGGGU&6	7	7	7	7	7rctjddd}||jd||jd||jddS)NrrXrawval)rrXrx)r@r]r|rrrXrus  rtest_interpolation_depth_errorz9CoverageOneHundredTestCase.test_interpolation_depth_errorGsj4Xy5=??%DEEEx000	22222rct|t5}tjdddn#1swxYwY|t|jd|t5}tjdddddn#1swxYwY|t|jdtjd}||jdtj	d5}tj
d	t||jdd|_||jddddn#1swxYwY|D]#}|
|jtu$dS)
Nz%Required argument `source' not given.rfilename)rr{z:Cannot specify both `filename' and `source'. Use `source'.r{Trecordalways)rrr@rr|r	rrrrrrr{rcategory)r
rrrwarnings     rtest_parsing_errorz-CoverageOneHundredTestCase.test_parsing_errorNsr


z
*
*	(b%'''	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(R\**-5	6	6	6


z
*
*	Lb%X
KKKK	L	L	L	L	L	L	L	L	L	L	L	L	L	L	LR\**-J	K	K	K)8<<<x000

$D
1
1
1	7Q!(,>???U^X666'ENU\:666		7	7	7	7	7	7	7	7	7	7	7	7	7	7	7
	D	DGOOG,0BBCCCC	D	Ds2;??B++B/2B/#AFFFc
tj}|d|tj5}|dddddn#1swxYwY|t
|jd|tj5}|dddddn#1swxYwY|t
|jddS)Nz
            [section]
            invalid_percent = %
            invalid_reference = %(()
            invalid_variable = %(does_not_exist)s
        rXinvalid_percentz.'%' must be followed by '%' or '(', found: '%'invalid_referencez+bad interpolation variable reference '%(()')r@rr<rrr|r	rr
rrs   rtest_interpolation_validationz8CoverageOneHundredTestCase.test_interpolation_validationas*,,	
	
	


|D
E
E	19/00	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1R\**->	?	?	?


|D
E
E	39122	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3R\**-?	@	@	@	@	@s$A##A'*A'5CCCctjd}tj}t	jd5}t	jdt||ddddn#1swxYwY|D]#}|	|j
tu$|t|d||dd	d
dS)Nz2
        [section]
        option = value
        Tr}rrr|rrXrr^)
rrr@rrrrrreadfprrr|r~)r
rrrrs     rtest_readfp_deprecationz2CoverageOneHundredTestCase.test_readfp_deprecationrs+k

*,,

$D
1
1
1	4Q!(,>???MM#
M333	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	D	DGOOG,0BBCCCCVa(((	*84g>>>>>s2A;;A?A?ctjd5}tjdtt	j}dddn#1swxYwY|D]#}||jtu$dS)NTr}r)rrrrr@SafeConfigParserrr)r
rrrs    r!test_safeconfigparser_deprecationz<CoverageOneHundredTestCase.test_safeconfigparser_deprecations

$D
1
1
1	5Q!(,>???!244F	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5	D	DGOOG,0BBCCCC	D	D.AAAcJtjd5}tjdtt	jdddn#1swxYwY|t|d|D]"}||j	t#dS)NTr}rr)
rrrrr@r_assertGreaterEqualr~rr)r
rrs   r$test_legacyinterpolation_deprecationz?CoverageOneHundredTestCase.test_legacyinterpolation_deprecations

$D
1
1
1	/Q!(,>???,...	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	
A***	@	@GMM'*,>????	@	@rctj}|d|t	|dddS)Nz7
            [section]
            key = value
        rXz<Section: section>)r@rr<r|reprrls  rtest_sectionproxy_reprz1CoverageOneHundredTestCase.test_sectionproxy_reprsY*,,	
	
	
	
fY/002FGGGGGrctj}ddl}|j|jd<|d|d|j||ddd||ddd	||ddd||ddd	|`|	t5|dddddn#1swxYwY|d|j|jd=|d|j|	t5|dddddn#1swxYwY|	t5|dddddn#1swxYwY|	t5|ddddddS#1swxYwYdS)
NrdecimalzS
            [s1]
            one = 1
            [s2]
            two = 2
        s1rrs2rr)r@rrDecimal
convertersr<rfr|
getdecimalrrrK)r
rrs   r"test_inconsistent_converters_statez=CoverageOneHundredTestCase.test_inconsistent_converters_statesJ*,,'.)$	
	
	
	


i!2333**477;;;**477;;;0077;;;0077;;;


~
.
.	+	+dE***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+

i!2333i(F$5666


~
.
.	+	+dE***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+


~
.
.	+	+4L##E***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+


~
.
.	+	+4L##E***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+sH%EEE+GGG3HH"HI))I-0I-N)
r!r"r#rFrvryrrrrrrrrrrrrrr:s,,777333DDD&@@@"???DDD@@@HHH+++++rrrcTeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
S)ExceptionPicklingTestCasezBTests for issue #13760: ConfigParser exceptions are not picklable.c`ddl}tjd}t|jdzD]}}|||}||}||j|j|t|t|~dS)Nrr^r)
pickler@ErrorrHIGHEST_PROTOCOLdumpsloadsr|messagerr
re1protopicklede2s      r
test_errorz$ExceptionPicklingTestCase.test_errors





(
(62Q677	1	1Ell2u--Gg&&BRZ444T"XXtBxx0000		1	1rcddl}tjd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
|t|t|dS)NrrXr)rr@rrrrrr|rrrXrrs      rtest_nosectionerrorz-ExceptionPicklingTestCase.test_nosectionerrors




(
3
362Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444T"XXtBxx0000
	1	1rc"ddl}tjdd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j|t|t|dS)NrrrXr)
rr@rrrrrr|rrrXrrrs      rtest_nooptionerrorz,ExceptionPicklingTestCase.test_nooptionerrors




')
<
<62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222T"XXtBxx0000	1	1rcdddl}tjddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j||j|j|t|t|dS)NrrXrrr)rr@rrrrrr|rrrXrrtrrs      rtest_duplicatesectionerrorz4ExceptionPicklingTestCase.test_duplicatesectionerrors




/	8S
I
I62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222RY	222T"XXtBxx0000	1	1rcddl}tjdddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j||j|j||j
|j
|t|t| dS)NrrXrrrr)rr@rrrrrr|rrrXrrrtrrs      rtest_duplicateoptionerrorz3ExceptionPicklingTestCase.test_duplicateoptionerrors4




.y(H62Q677		1		1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222RY	222RY	222T"XXtBxx0000		1		1rc$ddl}tjddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j|t|t|dSNrrrXmsgr)
rr@InterpolationErrorrrrrr|rrrXrrrs      rtest_interpolationerrorz1ExceptionPicklingTestCase.test_interpolationerrors




,Xy%
H
H62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222T"XXtBxx0000	1	1rcfddl}tjdddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j||j|j|t|t|dS)NrrrXrxrcr)rr@rdrrrrr|rrrXrrcrrs      r$test_interpolationmissingoptionerrorz>ExceptionPicklingTestCase.test_interpolationmissingoptionerrors




9(Ik##62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222R\2<888T"XXtBxx0000	1	1rc$ddl}tjddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j|t|t|dSr)
rr@rrrrrr|rrrXrrrs      rtest_interpolationsyntaxerrorz7ExceptionPicklingTestCase.test_interpolationsyntaxerror
s




28Y
N
N62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222T"XXtBxx0000	1	1rc$ddl}tjddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j|t|t|dS)NrrrXrxr)
rr@r]rrrrr|rrrXrrrs      rtest_interpolationdeptherrorz6ExceptionPicklingTestCase.test_interpolationdeptherrors




1(I62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RZ444RY	222T"XXtBxx0000	1	1rc<ddl}tjd}|dd|dd|ddt	|jdzD]}|||}||}||j	|j	||j
|j
||j|j||j|j|t|t|tjd	
}|dd|dd|ddt	|jdzD]}|||}||}||j	|j	||j
|j
||j|j||j|j|t|t|dS)Nrrrline1rline2rline3r{r|)rr@rryrrrrr|rrrerrorsrrs      rtest_parsingerrorz+ExceptionPicklingTestCase.test_parsingerror&sP




&x
0
0
		!W
		!W
		!W62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RY	222RY	222T"XXtBxx0000

&

;
;
;
		!W
		!W
		!W62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RY	222RY	222T"XXtBxx0000	1	1rcdddl}tjddd}t|jdzD]}|||}||}||j|j||j	|j	||j
|j
||j|j||j|j|t|t|dS)Nrr{rr_r)rr@rrrrrr|rrr_rrtrrs      rtest_missingsectionheadererrorz8ExceptionPicklingTestCase.test_missingsectionheadererrorAs




3JV
L
L62Q677	1	1Ell2u--Gg&&BRZ444RWbg...RWbg...RY	222RY	222T"XXtBxx0000	1	1rN)r!r"r#rFrrrrrrrrrrrrrrrrsLL111	1	1	1
1
1
1111
1
1
1
1
1
1111
1
1
1111111611111rrceZdZdZdZdS)InlineCommentStrippingTestCasez}Tests for issue #14590: ConfigParser doesn't strip inline comment when
    delimiter occurs earlier without preceding space..ctjd}|d|d}||dd||dd||d	d
||dd||d
d||dd||dd|d}||dd||dd||d	ddS)N)r)r*r)r0a
        [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
        rXk1zv1;still v1k2v2k3v3k4zv4;still v4k5zv5;still v5k6zv6;still v6; and still v6k7zv7;still v7; and still v7multiprefixzv3;#//still v3# and still v3)r@rr<r|)r
cfgrs   rtest_strippingz-InlineCommentStrippingTestCase.test_strippingSs\'A	
	
	

	N4-0004$'''4$'''4-0004-0004"=>>>4"=>>>
4-0004$'''4"@AAAAArN)r!r"r#rFrrrrrrOs2::BBBBBrrc0eZdZdZdZdZdZdZdZdS)ExceptionContextTestCasezO Test that implementation details doesn't leak
    through raising exceptions. c4tj}|d|tj}|5|dddddn#1swxYwY||jjddS)Nz
        [Paths]
        home_dir: /Users
        my_dir: %(home_dir1)s/lumberjack
        my_pictures: %(my_dir)s/Pictures
        Pathsmy_dirT)	r@rr<rrdrrr__suppress_context__rs   rtest_get_basic_interpolationz5ExceptionContextTestCase.test_get_basic_interpolationws*,,	
	
	


|K
L
L
	*	*JJw)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*

bl7>>>>>s
A--A14A1cZtjtj}|d|tj}|5|dddddn#1swxYwY||jj	ddS)Nrz
        [Paths]
        home_dir: /Users
        my_dir: ${home_dir1}/lumberjack
        my_pictures: ${my_dir}/Pictures
        rrT)
r@rrr<rrdrrrrrs   rtest_get_extended_interpolationz8ExceptionContextTestCase.test_get_extended_interpolations*$:<<>>>	
	
	


|K
L
L
	*	*JJw)))	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*

bl7>>>>>sBBBc.tj}|d|tj5}|ddddn#1swxYwY||jjddS)Nz2
        [Paths]
        home_dir: /Users
        rPT)	r@rr<rrrrrrrs   rtest_missing_optionsz-ExceptionContextTestCase.test_missing_optionss*,,	
	
	


|:
;
;	#rNN6"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#

bl7>>>>>sA**A.1A.ctj}|tj5}|ddddddn#1swxYwY||jjddS)NSection1an_int15T)r@rrrrrrrr
rrs   rtest_missing_sectionz-ExceptionContextTestCase.test_missing_sections*,,


|:
;
;	3rJJz8T222	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3

bl7>>>>>sAAActj}|tj5}|dddddn#1swxYwY||jjddS)NrrT)r@rrrrrrrrs   rtest_remove_optionz+ExceptionContextTestCase.test_remove_options*,,


|:
;
;	7r  X666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7

bl7>>>>>sAAAN)	r!r"r#rFrrrrrrrrrrssi$$?????????????????rrc8eZdZdZejZdfd	ZdZxZ	S)ConvertersTestCasez Introduced in 3.5, issue #18159.Ncbt|}d|jd<|S)Nrc>d|DS)Nc^g|]*}||+Sr)r)rrs  rrzBConvertersTestCase.newconfig.<locals>.<lambda>.<locals>.<listcomp>s<1?1?1?q45GGII1?1?1?1?r)r3vs rrz.ConvertersTestCase.newconfig.<locals>.<lambda>s'1?1?AGGII1?1?1?rr})superr:r)r
r,r9	__class__s   rr:zConvertersTestCase.newconfigs677$$h$77'?'?F#rc|}|d|j|d|j||jd||jd||jd||jd|t
|jd|t5d|jd<dddn#1swxYwY|t5d|jd<dddn#1swxYwY|	d	|d
}||dd||dd
||dd||dd||dd||
d
dd||
d
dd
||
d
dd||
d
dd||
d
dd||
d
dd||d
dd||d
dd||
d
dgd||d
dd||
dd||dd||dd||
dgd||dd|t5|d
ddddn#1swxYwY|t5|ddddn#1swxYwYddl}|j|jd<|d|j||jd|t
|jd|d}||d
d|||d||jd=|d|j|t
|jd|t5|d
ddddn#1swxYwY|t5|ddddn#1swxYwY|t(5|jd=dddn#1swxYwY|t(5|jd=dddn#1swxYwY|t(5|jd=ddddS#1swxYwYdS)Nrfr}rardr1c|Srrrs rrz4ConvertersTestCase.test_converters.<locals>.<lambda>s1rrc|Srrrs rrz4ConvertersTestCase.test_converters.<locals>.<lambda>sQrz~
        [s]
        str = string
        int = 1
        float = 0.5
        list = a b c d e f g
        bool = yes
        rr	r=rtz0.5z
a b c d e f gboolrrrg?)rrcdrrgTrrr)r:rfrrassertIsNotNoner|r~rrr<rrrgetlistrrrrrrKr)r
rrrdec0_5s     rtest_convertersz"ConvertersTestCase.test_converterssnn

i000

fcn---#./000#.1222#.3444S^F3444S^,,a000


z
*
*	-	-!,CN2	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-


z
*
*	/	/#.;CN4 	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	
	
	

H58,,,53'''7U+++6O4446E***e,,h777e,,c222g..666f--???f--u555e,,h777C//333c733S999S&114C4C4C	D	D	DV44d;;;ux000%!,,,G,,c2226**-<-<-<	=	=	=f--t444


~
.
.	)	)NN3(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)


~
.
.	"	"
LL!!!	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"$+Oy!

i000S^I6777S^,,a000''W55v>>>g..777N9%CN333S^,,a000


~
.
.	)	)NN3(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)


~
.
.	"	"
LL!!!	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"


x
(
(	*	*y)	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*


x
(
(	#	#r"	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


x
(
(	%	%t$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%s
D%%D),D)
E""E&)E&%SSS-TTTZZZ%[[[,	\\\&	\;;\?\? 	]66]:=]:r)
r!r"r#rFr@rr7r:r
__classcell__rs@rrrsa**,LD%D%D%D%D%D%D%rrc.eZdZdZdZdZdZdZdZdS)!BlatantOverrideConvertersTestCasez}What 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
    ctjdti}||j||||jddS)Nr~)r)r@rr~r<r	_test_lenrrr
rs  rtest_converters_at_initz9BlatantOverrideConvertersTestCase.test_converters_at_inits`'E3<@@@$$$sS^E233333rcGddtj}|}||j||||jd||dd||dd|	|dd|	|dd|j
|jd<|	|dd|	|dd|	|dd|	|dddS)NcPeZdZdZddejdfd
ZddejddZxZS)OBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParserz0a historic borough in south central PennsylvaniaFNr/rormc`||krdSt|||||S)NTr)rr)r
rXrr/rormrs      rrzZBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getbooleans?f$$4ww))'6s3;*===rcB|||t|||S)Nr)	_get_convr~)r
rXrr/rorms      rgetlenzVBlatantOverrideConvertersTestCase.test_inheritance.<locals>.StrangeConfigParser.getlens*~~gvs$/7&999r)	r!r"r#
gettysburgr@rCrrrrs@rStrangeConfigParserrsxKJ9>T!-!4
=
=
=
=
=
=
=6; , 3
9
9
9
9
9
9
9
9
9rrr~rrrf)r@rr<rrrrrrr_convert_to_boolean)r
rrs   rtest_inheritancez2BlatantOverrideConvertersTestCase.test_inheritances	9	9	9	9	9,";	9	9	9"!##$$$s#./000ue44555ue44555u55666u55666$'$;y!u55666u55666u55666u5566666rc|t|jd|d|j|d|j|d|j||jd||jd||jd||ddd||dd	d||dd
d||d	dd||d	d	d||d	d
d||d	dd
d
|tj	5|d	ddddn#1swxYwY||ddd||dd	d||dd
d||d	dd||d	d	d||d	d
d||d	dd
d
||d	dddS)Nr1rfr~tysburgrardrrrrfourrrl)
r|r~rrfrKrrrr@rrs  rrz+BlatantOverrideConvertersTestCase._test_len.sS^,,a000

i000

eS^,,,CN333#./000#.1222#.3444E5111555E5111555E733R888E5111555E5111555E733Q777E6A>>BBB


|9
:
:	&	&JJuf%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&U**5111555U**5111555U**733R888U**5111555U**5111555U**733Q777U**6155q999U**622D99999s!IIIc.tjd_fd_|j|tjd|	dj|
dj|jd|jd|jd|dd|d	d	|dd	|d	dj
jd<|dd|d	d	|dd	|d	d|ddd
|dd	d
|ddd|d	dd
|d	d	d
|d	dd
|t 5|ddd
dddn#1swxYwY|t 5|d	dd
ddddS#1swxYwYdS)NcdS)NTr)rXrs  rrzLBlatantOverrideConvertersTestCase.test_instance_assignment.<locals>.<lambda>Jsrc:t||Sr)r~)rXrrs  rrzLBlatantOverrideConvertersTestCase.test_instance_assignment.<locals>.<lambda>KsSWf1E-F-Frrrfr~rardrrrrrr1)r@rrrr<rr|r~rrfrKrrrrrrrs @rtest_instance_assignmentz:BlatantOverrideConvertersTestCase.test_instance_assignmentHs'))55FFFF
$$$S^,,a000

i000///#./000#.1222#.3444ue44555ue44555ue44555ue44555$'$;y!u55666u55666u55666u55666E5111555E5111555E733R888E5111555E5111555E733Q777

~
.
.	:	:SZ..u55q999	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:


~
.
.	:	:SZ..u55q999	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:s$,0N((N,/N,
0P

PPN)	r!r"r#rFrrrrrrrrrrsa::
F444777::::4:::::rrceZdZdZdS)MiscTestCasec@tj|tdhdS)Nr)not_exported)rcheck__all__r@rs rtest__all__zMiscTestCase.test__all__ks"T<wiHHHHHHrN)r!r"r#rrrrrrjs(IIIIIrr__main__)/collectionsr@rrr&runittestrrPrtest.supportrUserDictrr&rETestCaserTrWrrrrrrrrrrr!r#r<rHrLrQrUr`rbrrrrrrrrr!mainrrr<module>r&s								""""""%.Bq8q8q8q8q8*q8q8q8h]H$5
_L_L_L_L_L=(*;_L_L_LD!"!"!"!"!"-9J!"!"!"H@@@@@.B@@@0CCCCC83DCCC*****0D***     4H   DDDDDmX->DDD:0C0C0C0C0CmX->0C0C0Cf*****3J***IIIII#98;LIII(h@h@h@h@h@
x?Ph@h@h@V"6*.*.*.*.*.%;X=N*.*.*.Z77777)777:''''','''.22222/1B222,=("3&







P
P
P
P
P
x(P
P
P
fw+w+w+w+w+!2w+w+w+tX1X1X1X1X1 1X1X1X1v!B!B!B!B!BX%6!B!B!BH3?3?3?3?3?x03?3?3?lO%O%O%O%O%(9O%O%O%dl:l:l:l:l:(9l:l:l:^IIIII8$III
zHMOOOOOr