config root man

Current Path : /usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/test/test_cfgparser.pyo

³ò
h”Rc@s´ddkZddkZddkZddklZdeifd„ƒYZdefd„ƒYZdefd„ƒYZd	efd
„ƒYZ	d„Z
edjoe
ƒndS(
iÿÿÿÿN(ttest_supporttTestCaseBasecBsžeZdd„Zdd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„Zd„Zd„ZRS(cCs9|djo|iƒ|_n|i|ƒ|_|iS(N(tNonetconfig_classtcf(tselftdefaults((s//usr/local/lib/python2.5/test/test_cfgparser.pyt	newconfig	s
cCs/|i|ƒ}ti|ƒ}|i|ƒ|S(N(RtStringIOtreadfp(RtstringRRtsio((s//usr/local/lib/python2.5/test/test_cfgparser.pyt
fromstrings
c	Csy|idƒ}|iƒ}|iƒ|i}||dddddddgƒ||idd	ƒd
ƒ||idd	ƒd
ƒ||idd	ƒd
ƒ||iddƒdƒ||idd
ƒdƒ|id|idƒjdƒ|i|idd	ƒdƒ|i|i	dd	ƒdƒ|i|idd	ƒdƒ|i
ti|idd	ƒ||idd	ƒ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
Commented BarsFoo BarsInternationalized Stuffs	Long LinesSection\with$weird%characters[	tSpacess
Spacey Bartfootbarskey with spacestvaluesanother with spacesssplat!t__name__s3__name__ "option" should not be exposed by the API!s4remove_option() failed to report existance of options'remove_option() failed to remove optionsIremove_option() failed to report non-existance of option that was removedsNo Such Sections7this line is much, much longer than my editor
likes it.(
RtsectionstsorttassertEqualtgettfailIftoptionst
failUnlesst
remove_optiont
has_optiontassertRaisestConfigParsertNoSectionError(RRtLteq((s//usr/local/lib/python2.5/test/test_cfgparser.pyt
test_basics:	
		
c	CsÍ|iƒ}|idƒ|idƒ|iƒ}|iƒ|i}||ddgƒ|idddƒ||idƒdgƒ||iddƒddƒ|i|i	ddƒƒ|idddƒx*dD]"}|i|i	d|ƒdƒqÓW||idƒd	gƒ||idƒdgƒ|i
ddƒ||idƒgƒ|id
ƒ}||idƒdgƒ||iddƒdƒ|iddhdd<ƒ}|i|i	ddƒƒdS(NtAtatBRtbs@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_sectionRRRtsetRRRRRR(RRRRtopt((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_case_sensitivitySs:


		cCsr|ihdd<ƒ}|i|iddƒddƒ|ihdd<ƒ}|i|iddƒddƒdS(NtBarRtDEFAULTtFoos@could not locate option, expecting case-insensitive option namess<could not locate option, expecting case-insensitive defaults(RRR(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_default_case_sensitivityvscCs€|iƒ|itidƒ|itidƒ|itidƒ|itidƒ|itidƒ|itidƒdS(Ns[Foo]
  extra-spaces: splat
s[Foo]
  extra-spaces= splat
soo]
option-without-value
s![Foo]
:value-without-option-name
s![Foo]
=value-without-option-name
sNo Section!
(Rtparse_errorRtParsingErrortMissingSectionHeaderError(R((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_parse_errors€s
cCs,ti|ƒ}|i||ii|ƒdS(N(RRRR	(RtexctsrcR((s//usr/local/lib/python2.5/test/test_cfgparser.pyR3scCs³|iƒ}|i|iƒgdƒ|i|idƒdƒ|iti|idƒ|iti|i	dddƒ|i
tiddƒ|idƒ|i
tiddƒdS(Ns0new ConfigParser should have no defined sectionsR1s5new ConfigParser should have no acknowledged sectionsRRR(
RRRRthas_sectionRRRRR,t	get_errorR+t
NoOptionError(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_query_errors“s

cCsTy|ii||ƒWn|j
o
}|SnX|id|i|ifƒdS(Nsexpected exception type %s.%s(RRtfailt
__module__R(RR7R)R&te((s//usr/local/lib/python2.5/test/test_cfgparser.pyR:¡s		cCs„|idƒ}xntddƒD]]}|i|idd|ƒƒ|i|idd|ƒƒ|it|idd|ƒ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(RtrangeRt
getbooleanRRt
ValueError(RRtx((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_booleanªs		cCs6|iƒ}|idƒ|iti|idƒdS(NR1(RR+RRtDuplicateSectionError(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_weird_errorsÃs
cCsB|idƒ}tiƒ}|i|ƒ|i|iƒdƒdS(Nsr[Long Line]
foo: this line is much, much longer than my editor
   likes it.
[DEFAULT]
foo: another very
 long linesu[DEFAULT]
foo = another very
	long line

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

(RRtwriteRtgetvalue(RRtoutput((s//usr/local/lib/python2.5/test/test_cfgparser.pyt
test_writeÉs	
	cCsÑ|idƒ}dtfd„ƒY}|idddƒ|idd|dƒƒ|idddƒ|idd|dƒƒytWntj
on4X|iddtdƒƒ|iddtdƒƒdS(Ns[sect]
option1=foo
tmystrcBseZRS((RR>(((s//usr/local/lib/python2.5/test/test_cfgparser.pyRLåstsecttoption1tsplattoption2(RtstrR,tunicodet	NameError(RRRL((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_set_string_typesàscCstidƒ}|iƒ}|i|dgƒ}|i||gƒ|i|iddƒdƒ|iƒ}|i|ƒ}|i||gƒ|i|iddƒdƒ|iƒ}|idgƒ}|i|gƒ|iƒ}|igƒ}|i|gƒdS(Nscfgparser.1snonexistant-filesFoo BarRtnewbar(RtfindfileRtreadRR(Rtfile1Rtparsed_files((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_read_returns_file_listóscCs|iddhdd<ƒ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((s//usr/local/lib/python2.5/test/test_cfgparser.pytget_interpolation_config	scCsQ|iddhdd<ƒ}t|idƒƒ}|iƒ|i||ƒdS(NsY[section]
name = value
key: |%(name)s| 
getdefault: |%(default)s|
getname: |%(__name__)s|Rs	<default>tdefaultR)(RtlisttitemsRR(RtexpectedRR((s//usr/local/lib/python2.5/test/test_cfgparser.pytcheck_items_config%s
N(RR>RRRR R.R2R6R3R<R:RERGRKRTRZR\Ra(((s//usr/local/lib/python2.5/test/test_cfgparser.pyRs 	=	#	
											tConfigParserTestCasecBs5eZeiZd„Zd„Zd„Zd„ZRS(cCs“|iƒ}|i}||iddƒdƒ||iddƒdƒ||iddƒdƒ||iddƒdƒ|itidd	ƒdS(
NR1R[Rs%something with interpolation (1 step)tbar9s.something with lots of interpolation (9 steps)tbar10s/something with lots of interpolation (10 steps)tbar11(R\RRR:RtInterpolationDepthError(RRR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_interpolation5s	cCsa|iƒ}|itiddƒ}|i|idƒ|i|idƒ|i|idƒdS(NsInterpolation Errortnamet	reference(R\R:RtInterpolationErrorRRiR)R&(RRR?((s//usr/local/lib/python2.5/test/test_cfgparser.pyt test_interpolation_missing_value@scCs |iddd
ddgƒdS(NR]s	<default>t
getdefaults|<default>|R[s	|section|R(s|value|RhR(sdefaults	<default>(Rls|<default>|(sgetnames	|section|(skeys|value|(snamesvalue(Ra(R((s//usr/local/lib/python2.5/test/test_cfgparser.pyt
test_itemsHs
	cCsÇ|iƒ}|idƒ|idddƒ|iddddddddd	d
dg	ƒ|iddhd
d<dd<dd<ƒ|idddƒ|i|idddtƒdƒ|it|iddƒ|i|idddtƒddddddd	d
dg	ƒ|it|iddƒ|i|idddtƒhd
d<dd<dd<ƒ|it|iddƒ|i|idddtƒdƒ|it|idddt	ƒdS(Ns
non-stringtintiR^iiiiii
s%(tdictgn†ðù!	@tpis%(list)tstring_with_interpolations%(list)straw(
RR+R,RRtTrueRt	TypeErrorRCtFalse(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_set_nonstring_typesOs&
.""""
(RR>RRRgRkRmRv(((s//usr/local/lib/python2.5/test/test_cfgparser.pyRb2s
				tRawConfigParserTestCasecBs,eZeiZd„Zd„Zd„ZRS(cCs–|iƒ}|i}||iddƒdƒ||iddƒdƒ||iddƒdƒ||iddƒd	ƒ||idd
ƒdƒdS(NR1R[s%(__name__)sRs*something %(with1)s interpolation (1 step)Rcs3something %(with9)s lots of interpolation (9 steps)Rds5something %(with10)s lots of interpolation (10 steps)Res5something %(with11)s lots of interpolation (11 steps)(R\RR(RRR((s//usr/local/lib/python2.5/test/test_cfgparser.pyRghs	cCs |iddd
ddgƒdS(NR]s	<default>Rls
|%(default)s|R[s|%(__name__)s|R(s
|%(name)s|RhR(sdefaults	<default>(s
getdefaults
|%(default)s|(sgetnames|%(__name__)s|(skeys
|%(name)s|(snamesvalue(Ra(R((s//usr/local/lib/python2.5/test/test_cfgparser.pyRmus
	cCsì|iƒ}|idƒ|idddƒ|iddddddddd	d
gƒ|iddhdd
<ƒ|i|iddƒdƒ|i|iddƒddddddd	d
gƒ|i|iddƒhdd
<ƒdS(Ns
non-stringRniR^iiiiii
Rogn†ðù!	@Rp(RR+R,RR(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyRv|s
+(RR>RtRawConfigParserRRgRmRv(((s//usr/local/lib/python2.5/test/test_cfgparser.pyRwes		
	tSafeConfigParserTestCasecBs#eZeiZd„Zd„ZRS(cCsK|idƒ}|i|iddƒdƒ|i|iddƒ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(RRR(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyttest_safe_interpolation‹scCsÁ|idƒ}|it|idddƒ|it|idddƒ|it|iddtƒƒ|it|idddƒ|it|idddƒ|it|iddtƒƒdS(Ns[sect]
option1=foo
RMRNigð?RP(RRRtR,tobject(RR((s//usr/local/lib/python2.5/test/test_cfgparser.pyRv•s(RR>RtSafeConfigParserRR|Rv(((s//usr/local/lib/python2.5/test/test_cfgparser.pyRyˆs		
cCstitttƒdS(N(Rtrun_unittestRbRwRy(((s//usr/local/lib/python2.5/test/test_cfgparser.pyt	test_main¢st__main__(RRtunittestttestRtTestCaseRRbRwRyR€R(((s//usr/local/lib/python2.5/test/test_cfgparser.pys<module>sÿ+3#	


Man Man