Current File : //opt/imh-python/lib/python2.7/test/test_cfgparser.pyc
�
��Wc@spddlZddlZddlZddlZddlZddlmZdejfd��YZdejfd��YZ	de	fd��YZ
d	e	fd
��YZde	fd��YZd
e
fd��YZ
de
fd��YZdejfd��YZdejfd��YZdefd��YZdejfd��YZd�Zedkrle�ndS(i����N(ttest_supportt
SortedDictcBsDeZd�Zd�Zd�Zd�Zd�ZeZd�ZRS(cCs|jj�}|j�|S(N(tdatatitemstsort(tselftresult((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRs
cCs|jj�}|j�|S(N(RtkeysR(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRs
cCs'|j�}g|D]}|d^qS(Ni(R(RRti((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytvaluesscCst|j��S(N(titerR(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt	iteritemsscCst|j��S(N(R
R(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytiterkeysscCst|j��S(N(R
R	(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
itervaluess(	t__name__t
__module__RRR	RRt__iter__R
(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR
s					tTestCaseBasecBs�eZeZdd�Zdd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�ZRS(cCsI|dkr'|jd|j�|_n|j|d|j�|_|jS(Ntallow_no_value(tNonetconfig_classRtcf(Rtdefaults((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt	newconfig#s
cCs/|j|�}tj|�}|j|�|S(N(RtStringIOtreadfp(RtstringRRtsio((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
fromstring+s
cCs�d}|jr|d7}n|j|�}|j�}|j�ddddddd	g}|jru|jd
�n|j�|j}|||�||jdd�d�||jd	d�d�||jdd�d�||jdd
�d�||jdd�d�|jr7||jd
d�d�n|jd|j	d�d�|j
|jdd�d�|j|j
dd�d�|j|jdd�d�|jtj|jdd�||jdd�d�dS(NsQ[Foo Bar]
foo=bar
[Spacey Bar]
foo = bar
[Commented Bar]
foo: bar ; comment
[Long Line]
foo: this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]: Bulgarian
foo=Default
foo[en]=English
foo[de]=Deutsch
[Spaces]
key with spaces : value
another with spaces = splat!
s[NoValue]
option-without-value
s
Commented BarsFoo BarsInternationalized Stuffs	Long LinesSection\with$weird%characters[	tSpacess
Spacey BartNoValuetfootbarskey with spacestvaluesanother with spacesssplat!soption-without-valueRs3__name__ "option" should not be exposed by the API!s4remove_option() failed to report existence of options'remove_option() failed to remove optionsIremove_option() failed to report non-existence of option that was removedsNo Such Sections7this line is much, much longer than my editor
likes it.(RRtsectionsRtappendtassertEqualtgetRtassertNotIntoptionst
assertTruet
remove_optiontassertFalset
has_optiontassertRaisestConfigParsertNoSectionError(Rt
config_stringRtLtEteq((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
test_basic1sL	

		
	
	cCs�|j�}|jd�|jd�|j�}|j�|j}||ddg�|jddd�||jd�dg�||jdd�dd�|j|j	dd��|jddd�x*dD]"}|j|j	d|�d�q�W||jd�d	g�||jd�dg�|j
dd�||jd�g�|jd
�}||jd�dg�||jdd�d�|jddidd6�}|j|j	dd��dS(NtAtatBR!tbs@could not locate option, expecting case-insensitive option namessA-Bs	A-B valuesa-bsA-bsa-Bs9has_option() returned false for option which should exists,[MySection]
Option: first line
	second line
t	MySectiontoptiontOptionsfirst line
second lines[section]
nekey=nevalue
RtkeytsectiontKey(sa-bsA-bsa-BsA-B(Rtadd_sectionR"RR$tsetR'R%R(R+R)R(RRR0R2topt((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_case_sensitivity{s8


	
	cCsn|jidd6�}|j|jdd�dd�|jidd6�}|j|jdd�dd�dS(NtBarRtDEFAULTtFoos@could not locate option, expecting case-insensitive option namess<could not locate option, expecting case-insensitive defaults(RR$R%(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_default_case_sensitivity�scCsm|j�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�dS(Ns[Foo]
  extra-spaces: splat
s[Foo]
  extra-spaces= splat
s![Foo]
:value-without-option-name
s![Foo]
=value-without-option-name
sNo Section!
(Rtparse_errorR-tParsingErrortMissingSectionHeaderError(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_parse_errors�s
cCs,tj|�}|j||jj|�dS(N(RR,RR(RtexctsrcR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRF�scCs�|j�}|j|j�gd�|j|jd�d�|jtj|jd�|jtj|j	ddd�|j
tjdd�|jd�|j
tjdd�dS(Ns0new ConfigParser should have no defined sectionsRDs5new ConfigParser should have no acknowledged sectionsRR R!(
RR$R"R*thas_sectionR,R-R.R'R?t	get_errorR>t
NoOptionError(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_query_errors�s

cCsOy|jj||�Wn|k
r-}|SX|jd|j|jf�dS(Nsexpected exception type %s.%s(RR%tfailRR(RRJR<R9te((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRM�s	cCs�|jd�}xntdd�D]]}|j|jdd|��|j|jdd|��|jt|jdd|�qWdS(Ns{[BOOLTEST]
T1=1
T2=TRUE
T3=True
T4=oN
T5=yes
F1=0
F2=FALSE
F3=False
F4=oFF
F5=nO
E1=2
E2=foo
E3=-1
E4=0.1
E5=FALSE AND MOREiitBOOLTESTst%dsf%dse%d(RtrangeR(t
getbooleanR*R,t
ValueError(RRtx((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_boolean�s		cCs6|j�}|jd�|jtj|jd�dS(NRD(RR>R,R-tDuplicateSectionError(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_weird_errors�s
cCszd}|jr|d7}n|j|�}tj�}|j|�d}|jr`|d7}n|j|j�|�dS(Nss[Long Line]
foo: this line is much, much longer than my editor
   likes it.
[DEFAULT]
foo: another very
 long line
s![Valueless]
option-without-value
su[DEFAULT]
foo = another very
	long line

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

s"[Valueless]
option-without-value

(RRRtwriteR$tgetvalue(RR/Rtoutputt
expect_string((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
test_write�s	

		
cCs�|jd�}dtfd��Y}|jddd�|jdd|d��|jddd�|jdd|d��dS(Ns[sect]
option1=foo
tmystrcBseZRS((RR(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR_stsecttoption1tsplattoption2(RtstrR?(RRR_((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_set_string_typesscCsnytWntk
r(|jd�nX|jd�}|jddtd��|jddtd��dS(Nsno unicode supports[sect]
option1=foo
R`RaRbRc(tunicodet	NameErrortskipTestRR?(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_set_unicode s
cCstjd�}|j�}|j|dg�}|j||g�|j|jdd�d�|j�}|j|�}|j||g�|j|jdd�d�|j�}|jdg�}|j|g�|j�}|jg�}|j|g�dS(Nscfgparser.1snonexistent-filesFoo BarRtnewbar(RtfindfileRtreadR$R%(Rtfile1Rtparsed_files((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_read_returns_file_list+scCs|jddidd6�S(Ns�[Foo]
bar=something %(with1)s interpolation (1 step)
bar9=something %(with9)s lots of interpolation (9 steps)
bar10=something %(with10)s lots of interpolation (10 steps)
bar11=something %(with11)s lots of interpolation (11 steps)
with11=%(with10)s
with10=%(with9)s
with9=%(with8)s
with8=%(With7)s
with7=%(WITH6)s
with6=%(with5)s
With5=%(with4)s
WITH4=%(with3)s
with3=%(with2)s
with2=%(with1)s
with1=with

[Mutual Recursion]
foo=%(bar)s
bar=%(foo)s

[Interpolation Error]
name=%(reference)s
Rs%(__name__)stgetname(R(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytget_interpolation_configAscCsO|jddidd6�}t|jd��}|j�|j||�dS(NsY[section]
name = value
key: |%(name)s| 
getdefault: |%(default)s|
getname: |%(__name__)s|Rs	<default>tdefaultR<(RtlistRRR$(RtexpectedRR0((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytcheck_items_config]s
N(RRtFalseRRRRR3RARERIRFRORMRWRYR^ReRiRoRqRu(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR s$	J	#	
	
							$				tConfigParserTestCasecBs;eZejZeZd�Zd�Zd�Zd�Z	RS(cCs�idtj6dtj6}|j�}|j}||jdd�d�||jdd�d�||jdd�d�||jdd	�d
�|jtjdd�dS(Ns5something %(with11)s lots of interpolation (11 steps)s	%(with1)sRDRpR s%something with interpolation (1 step)tbar9s.something with lots of interpolation (9 steps)tbar10s/something with lots of interpolation (10 steps)tbar11(R-tSafeConfigParserRqR$R%RMtInterpolationDepthError(RtrawvalRR2((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_interpolationns

	cCs_|j�|jtjdd�}|j|jd�|j|jd�|j|jd�dS(NsInterpolation Errortnamet	reference(RqRMR-tInterpolationErrorR$R�R<R9(RRQ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt test_interpolation_missing_value~s
cCs |jddd
ddg�dS(NRrs	<default>t
getdefaults|<default>|Rps	|section|R;s|value|RR!(sdefaults	<default>(R�s|<default>|(sgetnames	|section|(skeys|value|(snamesvalue(Ru(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
test_items�s
	cCs�|j�}|jd�|jddd�|jddddddddd	d
dg	�|jddid
d6dd6dd6�|jddd�|jdd�|j|jdddt�d�|jt|jdd�|j|jdddt�ddddddd	d
dg	�|jt|jdd�|j|jdddt�id
d6dd6dd6�|jt|jdd�|j|jdddt�d�|jt|jdddt	�|j|jdd�d�dS(Ns
non-stringtintiRsiiiiii
s%(tdictgn��!	@tpis%(list)tstring_with_interpolations%(list)ssno-valuetraw(RR>R?R$R%tTrueR,t	TypeErrorRURvR(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_set_nonstring_types�s*
.""

(
RRR-RR�RR~R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRwjs				tMultilineValuesTestCasecBs>eZejZdjdd�Zd�Zd�Zd�ZRS(sSI'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam!t s	
cCs�|j�}xftd�D]X}dj|�}|j|�x3td�D]%}|j|dj|�|j�qHWqWttjd��}|j	|�WdQXdS(Nids	section{}i
s
lovely_spam{}tw(
RRStformatR>R?twonderful_spamtopenRtTESTFNRZ(RRRtstjtf((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytsetUp�s
'cCstjtj�dS(N(tostunlinkRR�(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttearDown�scCs`|j�}ttj��}|j|�WdQX|j|jdd�|jjdd��dS(Ntsection8tlovely_spam4s	
s
(	RR�RR�RR$R%R�treplace(Rtcf_from_fileR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt test_dominating_multiline_values�s
(	RRR-RR�R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR��s		
	tRawConfigParserTestCasecBs,eZejZd�Zd�Zd�ZRS(cCs�|j�}|j}||jdd�d�||jdd�d�||jdd�d�||jdd�d	�||jdd
�d�dS(NRDRps%(__name__)sR s*something %(with1)s interpolation (1 step)Rxs3something %(with9)s lots of interpolation (9 steps)Rys5something %(with10)s lots of interpolation (10 steps)Rzs5something %(with11)s lots of interpolation (11 steps)(RqR$R%(RRR2((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR~�s	cCs |jddd
ddg�dS(NRrs	<default>R�s
|%(default)s|Rps|%(__name__)s|R;s
|%(name)s|RR!(sdefaults	<default>(s
getdefaults
|%(default)s|(sgetnames|%(__name__)s|(skeys
|%(name)s|(snamesvalue(Ru(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR��s
	cCs�|j�}|jd�|jddd�|jddddddddd	d
g�|jddidd
6�|j|jdd�d�|j|jdd�ddddddd	d
g�|j|jdd�idd
6�dS(Ns
non-stringR�iRsiiiiii
R�gn��!	@R�(RR>R?R$R%(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR��s
+(RRR-tRawConfigParserRR~R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR��s		
	tSafeConfigParserTestCasecBs>eZejZd�Zd�Zd�Zd�Zd�Z	RS(cCsK|jd�}|j|jdd�d�|j|jdd�d�dS(NsW[section]
option1=xxx
option2=%(option1)s/xxx
ok=%(option1)s/%%s
not_ok=%(option2)s/%%sR<toksxxx/%stnot_oks
xxx/xxx/%s(RR$R%(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_safe_interpolation�scCs�|jd�}|j|jdd�d�|jt|jddd�|jt|jddd�|jt|jddd�|j|jdd�d�|jddd	�|j|jdd�d
�dS(Ns[sect]
option1=foo
R`RaRs%foosfoo%sf%ooRcsfoo%%barsfoo%bar(RR$R%R,RUR?(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt#test_set_malformatted_interpolation�scCs�|jd�}|jt|jddd�|jt|jddd�|jt|jddt��|jt|jddd�|jt|jddd�|jt|jddt��dS(Ns[sect]
option1=foo
R`Raig�?Rc(RR,R�R?tobject(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�scCs&|j�}|jt|jd�dS(NRr(RR,RUR>(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_add_section_default_1scCs&|j�}|jt|jd�dS(NRC(RR,RUR>(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_add_section_default_2s(
RRR-R{RR�R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR��s		
			tSafeConfigParserTestCaseNoValuecBseZeZRS((RRR�R(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�stTestChainMapcBseZd�ZRS(c
Cs7tdddd�}tdddd�}|j�}|j|�tj||�}|j|j�t�|jt	|j��t	|j���|jt	|j
��t	|j
���|jt	|j��t	|j���|jt	|�t	|��|j||�|jg|D]}||^q|j
��dj�}|jg|D]}|j
|d	�^qUg|D]}|j
|d	�^qw�|jg|D]}||k^q�g|D]}||k^q��tj��M|jg|D]}|j|�^q�g|D]}|j|�^q�WdQXdS(
Ntreditgreeniitblueisred green blue black browni
(R�tcopytupdateR-t	_ChainmaptassertIsInstanceRRsR$R?R	RtsplitR%Rtcheck_py3k_warningsthas_key(Rtd1td2tdcombtcmtktklist((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_issue_12717s(
(((-(&" 
%(RRR�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�stIssue7005TestCasecBs/eZdZdZd�Zd�Zd�ZRS(srTest output when None is set() as a value and allow_no_value == False.

    http://bugs.python.org/issue7005

    s[section]
option = None

cCsR|dt�}|jd�|jddd�tj�}|j|�|j�S(NRR<R9(RvR>R?RRRZR[(RRtcpR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pytprepare8s

cCs)|jtj�}|j||j�dS(N(R�R-R$texpected_output(RR\((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_none_as_value_stringifiedAscCs)|jtj�}|j||j�dS(N(R�R-R�R$R�(RR\((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt"test_none_as_value_stringified_rawEs(RRt__doc__R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�/s
			tSortedTestCasecBseZdd�Zd�ZRS(cCs"|jd|dt�|_|jS(NRt	dict_type(RRR(RR((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyRKscCsC|jd�tj�}|jj|�|j|j�d�dS(Ns [b]
o4=1
o3=2
o2=3
o1=4
[a]
k=v
s,[a]
k = v

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

(RRRRZR$R[(RR\((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_sortedOs

N(RRRRR�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�JstExceptionPicklingTestCasecBsheZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(sBTests for issue #13760: ConfigParser exceptions are not picklable.cCs�ddl}tjd�}xnt|jd�D]Y}|j||�}|j|�}|j|j|j�|jt	|�t	|��q/WdS(Ni����R!i(
tpickleR-tErrorRStHIGHEST_PROTOCOLtdumpstloadsR$tmessagetrepr(RR�te1tprototpickledte2((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt
test_errorfscCs�ddl}tjd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|jt|�t|��q/WdS(Ni����R<i(R�R-R.RSR�R�R�R$R�targsR<R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_nosectionerroroscCs�ddl}tjdd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|jt|�t|��q2WdS(Ni����R9R<i(
R�R-RNRSR�R�R�R$R�R�R<R9R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_nooptionerrorzscCs�ddl}tjd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|jt|�t|��q/WdS(Ni����R<i(R�R-RXRSR�R�R�R$R�R�R<R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_duplicatesectionerror�scCs�ddl}tjddd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|jt|�t|��q5WdS(Ni����R9R<tmsgi(
R�R-R�RSR�R�R�R$R�R�R<R9R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_interpolationerror�scCs�ddl}tjdddd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|j|j|j�|jt
|�t
|��q8WdS(Ni����R9R<R}R�i(R�R-tInterpolationMissingOptionErrorRSR�R�R�R$R�R�R<R9R�R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt$test_interpolationmissingoptionerror�scCs�ddl}tjddd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|jt|�t|��q5WdS(Ni����R9R<R�i(
R�R-tInterpolationSyntaxErrorRSR�R�R�R$R�R�R<R9R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_interpolationsyntaxerror�scCs�ddl}tjddd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|jt|�t|��q5WdS(Ni����R9R<R}i(
R�R-R|RSR�R�R�R$R�R�R<R9R�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_interpolationdeptherror�s	cCsddl}tjd�}|jdd�|jdd�|jdd�x�t|jd�D]�}|j||�}|j|�}|j|j	|j	�|j|j
|j
�|j|j|j�|j|j|j�|jt
|�t
|��q_WdS(	Ni����tsourceitline1itline2itline3(R�R-RGR#RSR�R�R�R$R�R�tfilenameterrorsR�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_parsingerror�scCs�ddl}tjddd�}x�t|jd�D]�}|j||�}|j|�}|j|j|j�|j|j	|j	�|j|j
|j
�|j|j|j�|j|j|j�|jt
|�t
|��q5WdS(Ni����R�i{tlinei(R�R-RHRSR�R�R�R$R�R�R�R�tlinenoR�(RR�R�R�R�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyttest_missingsectionheadererror�s(
RRR�R�R�R�R�R�R�R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyR�cs									
	c
Cs)tjtttttttt	t
�	dS(N(Rtrun_unittestRwR�R�R�R�R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt	test_main�st__main__(R-RR�tunittesttUserDictttestRRtTestCaseRRwR�R�R�R�R�R�R�R�R�R(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cfgparser.pyt<module>s(�K:#2~